rolfedh-doc-utils 0.1.17__py3-none-any.whl → 0.1.18__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.
- doc_utils/unused_attributes.py +27 -1
- {rolfedh_doc_utils-0.1.17.dist-info → rolfedh_doc_utils-0.1.18.dist-info}/METADATA +1 -1
- {rolfedh_doc_utils-0.1.17.dist-info → rolfedh_doc_utils-0.1.18.dist-info}/RECORD +7 -7
- {rolfedh_doc_utils-0.1.17.dist-info → rolfedh_doc_utils-0.1.18.dist-info}/WHEEL +0 -0
- {rolfedh_doc_utils-0.1.17.dist-info → rolfedh_doc_utils-0.1.18.dist-info}/entry_points.txt +0 -0
- {rolfedh_doc_utils-0.1.17.dist-info → rolfedh_doc_utils-0.1.18.dist-info}/licenses/LICENSE +0 -0
- {rolfedh_doc_utils-0.1.17.dist-info → rolfedh_doc_utils-0.1.18.dist-info}/top_level.txt +0 -0
doc_utils/unused_attributes.py
CHANGED
|
@@ -15,6 +15,29 @@ from pathlib import Path
|
|
|
15
15
|
from typing import Set, List, Optional
|
|
16
16
|
|
|
17
17
|
def parse_attributes_file(attr_file: str) -> Set[str]:
|
|
18
|
+
# AsciiDoc configuration attributes that control the processor itself
|
|
19
|
+
# These should be ignored as they won't appear in content
|
|
20
|
+
IGNORED_ATTRIBUTES = {
|
|
21
|
+
'data-uri',
|
|
22
|
+
'doctype',
|
|
23
|
+
'experimental',
|
|
24
|
+
'idprefix',
|
|
25
|
+
'imagesdir',
|
|
26
|
+
'includes',
|
|
27
|
+
'sectanchors',
|
|
28
|
+
'sectlinks',
|
|
29
|
+
'source-highlighter',
|
|
30
|
+
'linkattrs',
|
|
31
|
+
'toclevels',
|
|
32
|
+
'idseparator',
|
|
33
|
+
'icons',
|
|
34
|
+
'iconsdir',
|
|
35
|
+
'generated-dir',
|
|
36
|
+
'code-examples',
|
|
37
|
+
'doc-guides',
|
|
38
|
+
'doc-examples',
|
|
39
|
+
}
|
|
40
|
+
|
|
18
41
|
attributes = set()
|
|
19
42
|
|
|
20
43
|
# Check if file exists
|
|
@@ -30,7 +53,10 @@ def parse_attributes_file(attr_file: str) -> Set[str]:
|
|
|
30
53
|
for line in f:
|
|
31
54
|
match = re.match(r'^:([\w-]+):', line.strip())
|
|
32
55
|
if match:
|
|
33
|
-
|
|
56
|
+
attr_name = match.group(1)
|
|
57
|
+
# Skip ignored configuration attributes
|
|
58
|
+
if attr_name not in IGNORED_ATTRIBUTES:
|
|
59
|
+
attributes.add(attr_name)
|
|
34
60
|
except PermissionError:
|
|
35
61
|
raise PermissionError(f"Permission denied reading file: {attr_file}")
|
|
36
62
|
except UnicodeDecodeError as e:
|
|
@@ -15,13 +15,13 @@ doc_utils/scannability.py,sha256=XwlmHqDs69p_V36X7DLjPTy0DUoLszSGqYjJ9wE-3hg,982
|
|
|
15
15
|
doc_utils/spinner.py,sha256=lJg15qzODiKoR0G6uFIk2BdVNgn9jFexoTRUMrjiWvk,3554
|
|
16
16
|
doc_utils/topic_map_parser.py,sha256=tKcIO1m9r2K6dvPRGue58zqMr0O2zKU1gnZMzEE3U6o,4571
|
|
17
17
|
doc_utils/unused_adoc.py,sha256=2cbqcYr1os2EhETUU928BlPRlsZVSdI00qaMhqjSIqQ,5263
|
|
18
|
-
doc_utils/unused_attributes.py,sha256=
|
|
18
|
+
doc_utils/unused_attributes.py,sha256=OHyAdaBD7aNo357B0SLBN5NC_jNY5TWXMwgtfJNh3X8,7621
|
|
19
19
|
doc_utils/unused_images.py,sha256=nqn36Bbrmon2KlGlcaruNjJJvTQ8_9H0WU9GvCW7rW8,1456
|
|
20
20
|
doc_utils/validate_links.py,sha256=iBGXnwdeLlgIT3fo3v01ApT5k0X2FtctsvkrE6E3VMk,19610
|
|
21
21
|
doc_utils/version_check.py,sha256=1ySC6Au21OqUMZr7AkIa3nMNh3M6wLQmPQCi-ZFIqoE,6338
|
|
22
|
-
rolfedh_doc_utils-0.1.
|
|
23
|
-
rolfedh_doc_utils-0.1.
|
|
24
|
-
rolfedh_doc_utils-0.1.
|
|
25
|
-
rolfedh_doc_utils-0.1.
|
|
26
|
-
rolfedh_doc_utils-0.1.
|
|
27
|
-
rolfedh_doc_utils-0.1.
|
|
22
|
+
rolfedh_doc_utils-0.1.18.dist-info/licenses/LICENSE,sha256=vLxtwMVOJA_hEy8b77niTkdmQI9kNJskXHq0dBS36e0,1075
|
|
23
|
+
rolfedh_doc_utils-0.1.18.dist-info/METADATA,sha256=0MRwKnjHS1EEX5--O9m0UQVvQpYSICZ1k-VSTX3VhQA,7824
|
|
24
|
+
rolfedh_doc_utils-0.1.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
rolfedh_doc_utils-0.1.18.dist-info/entry_points.txt,sha256=2J4Ojc3kkuArpe2xcUOPc0LxSWCmnctvw8hy8zpnbO4,418
|
|
26
|
+
rolfedh_doc_utils-0.1.18.dist-info/top_level.txt,sha256=1w0JWD7w7gnM5Sga2K4fJieNZ7CHPTAf0ozYk5iIlmo,182
|
|
27
|
+
rolfedh_doc_utils-0.1.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|