webcode-tk 1.2.3__tar.gz → 1.2.6__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.
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/PKG-INFO +8 -4
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/pyproject.toml +5 -3
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/__init__.py +1 -1
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/color_tools.py +4 -6
- webcode_tk-1.2.6/webcode_tk/contrast_tools.py +1630 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/validator_tools.py +46 -2
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/LICENSE.rst +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/README.rst +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/animation_tools.py +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/cascade_tools.py +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/color_keywords.py +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/css_tools.py +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/font_tools.py +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/html_tools.py +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/sample_report.json +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/utils.py +0 -0
- {webcode_tk-1.2.3 → webcode_tk-1.2.6}/webcode_tk/ux_tools.py +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: webcode-tk
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.6
|
|
4
4
|
Summary:
|
|
5
5
|
License: MIT
|
|
6
|
+
License-File: LICENSE.rst
|
|
6
7
|
Keywords: html,validation,css
|
|
7
8
|
Author: hundredvisionsguy
|
|
8
9
|
Author-email: cwinikka@gmail.com
|
|
@@ -15,14 +16,17 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
15
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
-
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
20
|
Requires-Dist: bs4 (>=0.0.1,<0.0.2)
|
|
20
21
|
Requires-Dist: file-clerk (>=1.0.9,<2.0.0)
|
|
21
|
-
Requires-Dist: lxml (>=
|
|
22
|
+
Requires-Dist: lxml (>=6.0.0,<7.0.0)
|
|
23
|
+
Requires-Dist: mechanicalsoup (>=1.4.0,<2.0.0)
|
|
22
24
|
Requires-Dist: nltk (>=3.8.1,<4.0.0)
|
|
23
25
|
Requires-Dist: py-readability-metrics (>=1.4.5,<2.0.0)
|
|
26
|
+
Requires-Dist: pytest-mock (>=3.15.1,<4.0.0)
|
|
24
27
|
Requires-Dist: requests (>=2.28.1,<3.0.0)
|
|
25
28
|
Requires-Dist: textatistic (>=0.0.1,<0.0.2)
|
|
29
|
+
Requires-Dist: tinycss2 (>=1.4.0,<2.0.0)
|
|
26
30
|
Project-URL: Documentation, https://hundredvisionsguy.github.io/webcode-tk/
|
|
27
31
|
Project-URL: Homepage, https://github.com/HundredVisionsGuy/webcode-tk
|
|
28
32
|
Project-URL: Repository, https://github.com/HundredVisionsGuy/webcode-tk
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "webcode-tk"
|
|
3
|
-
version = "1.2.
|
|
3
|
+
version = "1.2.6"
|
|
4
4
|
description = ""
|
|
5
5
|
authors = ["hundredvisionsguy <cwinikka@gmail.com>"]
|
|
6
6
|
keywords = ["html", "validation", "css", ]
|
|
@@ -19,12 +19,14 @@ classifiers = [
|
|
|
19
19
|
python = ">=3.9.0,<4.0"
|
|
20
20
|
bs4 = "^0.0.1"
|
|
21
21
|
file-clerk = "^1.0.9"
|
|
22
|
-
lxml = "^4.9.1"
|
|
23
22
|
requests = "^2.28.1"
|
|
24
|
-
MechanicalSoup = "^1.1.0"
|
|
25
23
|
py-readability-metrics = "^1.4.5"
|
|
26
24
|
textatistic = "^0.0.1"
|
|
27
25
|
nltk = "^3.8.1"
|
|
26
|
+
tinycss2 = "^1.4.0"
|
|
27
|
+
lxml = "^6.0.0"
|
|
28
|
+
mechanicalsoup = "^1.4.0"
|
|
29
|
+
pytest-mock = "^3.15.1"
|
|
28
30
|
|
|
29
31
|
[tool.poetry.dev-dependencies]
|
|
30
32
|
pytest = "*"
|
|
@@ -409,7 +409,7 @@ def hex_to_decimal(c: str) -> int:
|
|
|
409
409
|
msg += "2 digits"
|
|
410
410
|
raise ValueError(msg)
|
|
411
411
|
if c[0].lower() not in hex_map.keys():
|
|
412
|
-
raise ValueError(f"The value
|
|
412
|
+
raise ValueError(f"The value {repr(c)} is not a valid hex code.")
|
|
413
413
|
c = c.lower()
|
|
414
414
|
ones = hex_map[c[1]]
|
|
415
415
|
sixteens = hex_map[c[0]] * 16
|
|
@@ -613,11 +613,9 @@ def contrast_ratio(hex1: str, hex2: str) -> float:
|
|
|
613
613
|
l1 = l2
|
|
614
614
|
l2 = temp
|
|
615
615
|
ratio = (l1 + 0.05) / (l2 + 0.05)
|
|
616
|
-
#
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
ratio_string = ratio_string[: dot_pos + 3]
|
|
620
|
-
return float(ratio_string)
|
|
616
|
+
# round to 1 decimal place
|
|
617
|
+
ratio = round(ratio, 1)
|
|
618
|
+
return ratio
|
|
621
619
|
|
|
622
620
|
|
|
623
621
|
def get_color_type(code: str) -> str:
|