pre-commit-html 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl
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.
- pre_commit_html/__init__.py +17 -16
- pre_commit_html/__main__.py +4 -0
- {pre_commit_html-0.1.1.dist-info → pre_commit_html-0.1.2.dist-info}/METADATA +1 -1
- pre_commit_html-0.1.2.dist-info/RECORD +11 -0
- {pre_commit_html-0.1.1.dist-info → pre_commit_html-0.1.2.dist-info}/WHEEL +1 -1
- pre_commit_html-0.1.2.dist-info/entry_points.txt +3 -0
- pre_commit_html-0.1.1.dist-info/RECORD +0 -10
- {pre_commit_html-0.1.1.dist-info → pre_commit_html-0.1.2.dist-info}/LICENSE +0 -0
pre_commit_html/__init__.py
CHANGED
@@ -56,24 +56,25 @@ class PreCommitParser:
|
|
56
56
|
if "\\" in line and ":" in line and len(code_part) == 0:
|
57
57
|
h3_file = line.replace("\\", "/")
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
(
|
69
|
-
|
70
|
-
|
59
|
+
if len(h3_file.split(":")) == 4:
|
60
|
+
path_code_file = h3_file.split(":")[0]
|
61
|
+
line_code = h3_file.split(":")[1]
|
62
|
+
column_code = h3_file.split(":")[2]
|
63
|
+
message = h3_file.split(":")[3]
|
64
|
+
|
65
|
+
ruff_ref = message.split(" ")[1]
|
66
|
+
|
67
|
+
code_error.append(
|
68
|
+
"".join(
|
69
|
+
(
|
70
|
+
f'<h3>File: <a href="./{path_code_file}:{line_code}:',
|
71
|
+
f'{column_code}">{path_code_file}:{line_code}:{column_code}</a></h3>',
|
72
|
+
)
|
71
73
|
)
|
72
74
|
)
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
)
|
75
|
+
code_error.append(
|
76
|
+
f'<p>Error: <a href="https://docs.astral.sh/ruff/rules/#{ruff_ref}">{ruff_ref}</a>{message}</p>'
|
77
|
+
)
|
77
78
|
|
78
79
|
elif "\\" in line and ":" in line and len(code_part) > 0:
|
79
80
|
h3_file = line.replace("\\", "/")
|
pre_commit_html/__main__.py
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
pre_commit_html/__init__.py,sha256=W30OYPhTtrsoGH_xbIFRGO8IpDKcL5OEdobZLqYXYrM,4364
|
2
|
+
pre_commit_html/__main__.py,sha256=ME8XDYKL00PsCgA96rYrGqzujMCu5FiUPVZo5VyiZ6w,367
|
3
|
+
pre_commit_html/site/nothing,sha256=FgEEp-DgpF7jCB5mTtiWk_6yQcNz6q68-hqvGHulRbA,15
|
4
|
+
pre_commit_html/site/templates/code_error.jinja,sha256=Nca684pgieEMbgrHFEl7acf26-e5LpGQIYFMDfyHoZ0,52
|
5
|
+
pre_commit_html/site/templates/code_part.jinja,sha256=ZmTKj9Ev1_yDoUQJlZ1RQZb1-VYDOSkN2sNvwbnfng0,111
|
6
|
+
pre_commit_html/site/templates/html_content.jinja,sha256=9dmoVLZ-BmYEf27j_52F6md23WS_5JshkTqO9VpRvX0,1695
|
7
|
+
pre_commit_html-0.1.2.dist-info/LICENSE,sha256=3V9deIJXT--GYubOVNXj1madYOvijNEIn03Yh6ChvPI,1066
|
8
|
+
pre_commit_html-0.1.2.dist-info/METADATA,sha256=SRNwXpJjTDfIWzwLcFsu_AcjfQW4YXIVZuTaGtnAVcw,2926
|
9
|
+
pre_commit_html-0.1.2.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
10
|
+
pre_commit_html-0.1.2.dist-info/entry_points.txt,sha256=qosHLsMCjOyjqzpzxw7GKkNQ5RzBxXAh6sFjINUHpMM,60
|
11
|
+
pre_commit_html-0.1.2.dist-info/RECORD,,
|
@@ -1,10 +0,0 @@
|
|
1
|
-
pre_commit_html/__init__.py,sha256=E4lwFOTo62ty9IO7bHwAfWi43aYnXB3pRunP9MRrENg,4251
|
2
|
-
pre_commit_html/__main__.py,sha256=4x-U3lLq6mNLINz0L6YAS2uMDmk8L0KVm2bCDc_9CrY,315
|
3
|
-
pre_commit_html/site/nothing,sha256=FgEEp-DgpF7jCB5mTtiWk_6yQcNz6q68-hqvGHulRbA,15
|
4
|
-
pre_commit_html/site/templates/code_error.jinja,sha256=Nca684pgieEMbgrHFEl7acf26-e5LpGQIYFMDfyHoZ0,52
|
5
|
-
pre_commit_html/site/templates/code_part.jinja,sha256=ZmTKj9Ev1_yDoUQJlZ1RQZb1-VYDOSkN2sNvwbnfng0,111
|
6
|
-
pre_commit_html/site/templates/html_content.jinja,sha256=9dmoVLZ-BmYEf27j_52F6md23WS_5JshkTqO9VpRvX0,1695
|
7
|
-
pre_commit_html-0.1.1.dist-info/LICENSE,sha256=3V9deIJXT--GYubOVNXj1madYOvijNEIn03Yh6ChvPI,1066
|
8
|
-
pre_commit_html-0.1.1.dist-info/METADATA,sha256=rNYl2-gxKmM0ICFg4qQQGZgHJ81MnLy6X_SA_fTR4Rw,2926
|
9
|
-
pre_commit_html-0.1.1.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
10
|
-
pre_commit_html-0.1.1.dist-info/RECORD,,
|
File without changes
|