maketool 0.8.16__tar.gz → 0.8.17__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.
- {maketool-0.8.16 → maketool-0.8.17}/PKG-INFO +1 -1
- {maketool-0.8.16 → maketool-0.8.17}/maketool/refscan.py +25 -19
- {maketool-0.8.16 → maketool-0.8.17}/maketool.egg-info/PKG-INFO +1 -1
- {maketool-0.8.16 → maketool-0.8.17}/pyproject.toml +1 -1
- {maketool-0.8.16 → maketool-0.8.17}/README.md +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool/__init__.py +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool/build.py +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool/clean.py +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool/compile.py +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool/run.py +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool/sublime.py +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool.egg-info/SOURCES.txt +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool.egg-info/dependency_links.txt +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool.egg-info/entry_points.txt +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/maketool.egg-info/top_level.txt +0 -0
- {maketool-0.8.16 → maketool-0.8.17}/setup.cfg +0 -0
|
@@ -7,7 +7,7 @@ Usage:
|
|
|
7
7
|
|
|
8
8
|
Reports:
|
|
9
9
|
1) UNUSED files: filename/path tokens not found in scanned text sources
|
|
10
|
-
-
|
|
10
|
+
- Grouped by extension, with .py printed last and a blank line before the .py group
|
|
11
11
|
2) MISSING imports: imports used by entry (and local-resolved siblings) but not installed
|
|
12
12
|
"""
|
|
13
13
|
|
|
@@ -112,15 +112,28 @@ def is_text_source(p: Path) -> bool:
|
|
|
112
112
|
return ext in DEFAULT_SCAN_EXTS
|
|
113
113
|
|
|
114
114
|
|
|
115
|
-
def
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
115
|
+
def print_unused_grouped(unused_rels: list[str]) -> None:
|
|
116
|
+
"""
|
|
117
|
+
Print unused files grouped by extension, with .py printed last and a blank
|
|
118
|
+
line inserted before the .py group.
|
|
119
|
+
"""
|
|
120
|
+
def sort_key(rel: str):
|
|
121
|
+
ext = Path(rel).suffix.lower()
|
|
122
|
+
is_py = (ext == ".py")
|
|
123
|
+
return (is_py, ext, rel.lower())
|
|
124
|
+
|
|
125
|
+
unused_sorted = sorted(unused_rels, key=sort_key)
|
|
126
|
+
|
|
127
|
+
print("UNUSED files (no filename/path tokens found)")
|
|
128
|
+
print("--------------------------------------------")
|
|
129
|
+
|
|
130
|
+
printed_py_gap = False
|
|
131
|
+
for rel in unused_sorted:
|
|
132
|
+
if Path(rel).suffix.lower() == ".py" and not printed_py_gap:
|
|
133
|
+
print() # blank line before first .py file
|
|
134
|
+
printed_py_gap = True
|
|
135
|
+
print(rel)
|
|
136
|
+
|
|
124
137
|
print()
|
|
125
138
|
|
|
126
139
|
|
|
@@ -332,15 +345,8 @@ def main() -> int:
|
|
|
332
345
|
if any(tok in hay for tok in c.tokens):
|
|
333
346
|
references[c.rel].append(src_rel)
|
|
334
347
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
if not references[c.rel]:
|
|
338
|
-
unused_rows.append((c.rel, references[c.rel]))
|
|
339
|
-
|
|
340
|
-
# Group-by-extension presentation: sort by extension, then by name
|
|
341
|
-
unused_rows.sort(key=lambda item: (Path(item[0]).suffix.lower(), item[0].lower()))
|
|
342
|
-
|
|
343
|
-
print_group("UNUSED files (no filename/path tokens found)", unused_rows)
|
|
348
|
+
unused_rels = [c.rel for c in candidates if not references[c.rel]]
|
|
349
|
+
print_unused_grouped(unused_rels)
|
|
344
350
|
|
|
345
351
|
if entry.suffix.lower() == ".py":
|
|
346
352
|
run_missing_imports_report(entry=entry, project_root=root)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|