webcode-tk 1.2.1__tar.gz → 1.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: webcode-tk
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Summary:
5
5
  License: MIT
6
6
  Keywords: html,validation,css
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "webcode-tk"
3
- version = "1.2.1"
3
+ version = "1.2.3"
4
4
  description = ""
5
5
  authors = ["hundredvisionsguy <cwinikka@gmail.com>"]
6
6
  keywords = ["html", "validation", "css", ]
@@ -35,4 +35,4 @@
35
35
  - **`validator_tools`**: sends HTML or CSS code to the W3C Validator to check
36
36
  for errors.
37
37
  """
38
- __version__ = "1.2.1"
38
+ __version__ = "1.2.3"
@@ -2,6 +2,7 @@
2
2
  A group of functions that work with css_tools and cascade_tools to provide
3
3
  reports on CSS animations.
4
4
  """
5
+ from collections.abc import Iterable
5
6
  from typing import Union
6
7
 
7
8
  from file_clerk import clerk
@@ -151,12 +152,13 @@ def get_keyframe_report(
151
152
  animation_report = get_animation_report(project_folder)
152
153
  keyframe_results = get_keyframe_data(animation_report)
153
154
  for file, results in keyframe_results.items():
154
- pct_keyframes, froms, tos = results.values()
155
- msg = ""
156
-
157
- num_pct = len(pct_keyframes)
158
- num_froms_tos = froms + tos
159
- overall_num = num_pct + num_froms_tos
155
+ pct_keyframes = results["pct_keyframes"]
156
+ if isinstance(pct_keyframes, Iterable):
157
+ pct_keyframes = len(pct_keyframes)
158
+ num_froms_tos = results["froms_tos"]
159
+ if isinstance(num_froms_tos, Iterable):
160
+ num_froms_tos = len(num_froms_tos)
161
+ overall_num = pct_keyframes + num_froms_tos
160
162
  if overall_num >= num_goal:
161
163
  msg = f"pass: {file} has {overall_num} keyframes (enough "
162
164
  msg += "overall to meet)."
@@ -166,7 +168,7 @@ def get_keyframe_report(
166
168
  msg += f"{remaining} more to pass)."
167
169
  report.append(msg)
168
170
  if pct_goal:
169
- if num_pct >= pct_goal:
171
+ if pct_keyframes >= pct_goal:
170
172
  msg = f"pass: {file} has {pct_keyframes} percentage "
171
173
  msg += "keyframes."
172
174
  else:
File without changes
File without changes