codelexity 0.2.2__tar.gz → 0.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.
- {codelexity-0.2.2 → codelexity-0.2.3}/PKG-INFO +1 -1
- {codelexity-0.2.2 → codelexity-0.2.3}/pyproject.toml +2 -2
- {codelexity-0.2.2 → codelexity-0.2.3}/pyproject.toml.orig +2 -2
- {codelexity-0.2.2 → codelexity-0.2.3}/src/codelexity/calculations.py +1 -3
- {codelexity-0.2.2 → codelexity-0.2.3}/src/codelexity/graph.py +4 -1
- {codelexity-0.2.2 → codelexity-0.2.3}/LICENSE +0 -0
- {codelexity-0.2.2 → codelexity-0.2.3}/README.md +0 -0
- {codelexity-0.2.2 → codelexity-0.2.3}/src/codelexity/__init__.py +0 -0
- {codelexity-0.2.2 → codelexity-0.2.3}/src/codelexity/halstead.py +0 -0
- {codelexity-0.2.2 → codelexity-0.2.3}/src/codelexity/main.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codelexity"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.3"
|
|
4
4
|
description = "A package that measures code complexity in the age of AI slop."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -43,7 +43,7 @@ path = "src"
|
|
|
43
43
|
editable = true
|
|
44
44
|
|
|
45
45
|
[tool.bumpver]
|
|
46
|
-
current_version = "0.2.
|
|
46
|
+
current_version = "0.2.3"
|
|
47
47
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
48
48
|
push = false
|
|
49
49
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codelexity"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.3"
|
|
4
4
|
description = "A package that measures code complexity in the age of AI slop."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.11"
|
|
@@ -48,7 +48,7 @@ dev = [
|
|
|
48
48
|
]
|
|
49
49
|
|
|
50
50
|
[tool.bumpver]
|
|
51
|
-
current_version = "0.2.
|
|
51
|
+
current_version = "0.2.3"
|
|
52
52
|
version_pattern = "MAJOR.MINOR.PATCH"
|
|
53
53
|
push = false # inspect the tag before it leaves the machine
|
|
54
54
|
|
|
@@ -96,8 +96,6 @@ def _resolve(name, search):
|
|
|
96
96
|
try:
|
|
97
97
|
found = locations and importlib.machinery.PathFinder.find_spec(".".join(parts[: i + 1]), locations)
|
|
98
98
|
except KeyError:
|
|
99
|
-
# ponytail: namespace packages need their own parent in sys.modules
|
|
100
|
-
# to build a submodule spec; we never import, so treat as unresolved.
|
|
101
99
|
found = None
|
|
102
100
|
if not found:
|
|
103
101
|
break
|
|
@@ -113,7 +111,7 @@ def imports(module_path, root=None):
|
|
|
113
111
|
search = sys.path + [str(root), *(str(d) for d in root.rglob("*") if d.is_dir())]
|
|
114
112
|
names = {n for n in _import_names(code) if n.split(".")[0] not in sys.builtin_module_names}
|
|
115
113
|
specs = (_resolve(n, search) for n in names)
|
|
116
|
-
return sorted({s.origin for s in specs if s and s.origin})
|
|
114
|
+
return sorted({Path(s.origin).as_posix() for s in specs if s and s.origin})
|
|
117
115
|
|
|
118
116
|
|
|
119
117
|
def analyze_module(path, root=None):
|
|
@@ -90,4 +90,7 @@ def create_viz(package_data: dict, fpath: str):
|
|
|
90
90
|
f"Total comprehension time (h): {package_data['analytics']['total_man_hours']}</div>"
|
|
91
91
|
)
|
|
92
92
|
path = Path(fpath)
|
|
93
|
-
|
|
93
|
+
# encoding pinned both ways: pyvis writes UTF-8, but Windows defaults to cp1252, which raises
|
|
94
|
+
# UnicodeDecodeError on read and produces mojibake on write.
|
|
95
|
+
html = path.read_text(encoding="utf-8")
|
|
96
|
+
path.write_text(html.replace("<body>", f"<body>\n{legend}", 1), encoding="utf-8")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|