codecrate 0.1.0__py3-none-any.whl → 0.1.1__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.
Potentially problematic release.
This version of codecrate might be problematic. Click here for more details.
- codecrate/_version.py +2 -2
- codecrate/cli.py +6 -5
- codecrate/config.py +13 -4
- codecrate/parse.py +3 -1
- {codecrate-0.1.0.dist-info → codecrate-0.1.1.dist-info}/METADATA +1 -1
- {codecrate-0.1.0.dist-info → codecrate-0.1.1.dist-info}/RECORD +10 -10
- {codecrate-0.1.0.dist-info → codecrate-0.1.1.dist-info}/WHEEL +1 -1
- {codecrate-0.1.0.dist-info → codecrate-0.1.1.dist-info}/entry_points.txt +0 -0
- {codecrate-0.1.0.dist-info → codecrate-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {codecrate-0.1.0.dist-info → codecrate-0.1.1.dist-info}/top_level.txt +0 -0
codecrate/_version.py
CHANGED
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
31
|
+
__version__ = version = '0.1.1'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 1)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
codecrate/cli.py
CHANGED
|
@@ -175,11 +175,12 @@ def main(argv: list[str] | None = None) -> None:
|
|
|
175
175
|
if args.layout is not None
|
|
176
176
|
else str(getattr(cfg, "layout", "auto")).strip().lower()
|
|
177
177
|
)
|
|
178
|
-
|
|
179
|
-
args.output
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
if args.output is not None:
|
|
179
|
+
out_path = args.output
|
|
180
|
+
else:
|
|
181
|
+
out_path = Path(getattr(cfg, "output", "context.md"))
|
|
182
|
+
if not out_path.is_absolute():
|
|
183
|
+
out_path = root / out_path
|
|
183
184
|
disc = discover_files(
|
|
184
185
|
root=root,
|
|
185
186
|
include=include,
|
codecrate/config.py
CHANGED
|
@@ -61,10 +61,19 @@ def load_config(root: Path) -> Config:
|
|
|
61
61
|
return Config()
|
|
62
62
|
|
|
63
63
|
data = tomllib.loads(cfg_path.read_text(encoding="utf-8"))
|
|
64
|
-
section: dict[str, Any] =
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
section: dict[str, Any] = {}
|
|
65
|
+
if isinstance(data, dict):
|
|
66
|
+
# Preferred: [codecrate]
|
|
67
|
+
cc = data.get("codecrate")
|
|
68
|
+
if isinstance(cc, dict):
|
|
69
|
+
section = cc
|
|
70
|
+
else:
|
|
71
|
+
# Also accept: [tool.codecrate] (common convention from pyproject.toml)
|
|
72
|
+
tool = data.get("tool")
|
|
73
|
+
if isinstance(tool, dict):
|
|
74
|
+
cc2 = tool.get("codecrate")
|
|
75
|
+
if isinstance(cc2, dict):
|
|
76
|
+
section = cc2
|
|
68
77
|
cfg = Config()
|
|
69
78
|
out = section.get("output", cfg.output)
|
|
70
79
|
if isinstance(out, str) and out.strip():
|
codecrate/parse.py
CHANGED
|
@@ -127,7 +127,9 @@ class _Visitor(ast.NodeVisitor):
|
|
|
127
127
|
def parse_symbols(
|
|
128
128
|
path: Path, root: Path, text: str
|
|
129
129
|
) -> tuple[list[ClassRef], list[DefRef]]:
|
|
130
|
-
|
|
130
|
+
# Pass filename so SyntaxWarnings (e.g. invalid escape sequences) point to
|
|
131
|
+
# the real file instead of "<unknown>".
|
|
132
|
+
tree = ast.parse(text, filename=path.as_posix())
|
|
131
133
|
v = _Visitor(path=path, root=root)
|
|
132
134
|
v.visit(tree)
|
|
133
135
|
return v.classes, v.defs
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
codecrate/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
codecrate/_version.py,sha256=
|
|
3
|
-
codecrate/cli.py,sha256=
|
|
4
|
-
codecrate/config.py,sha256=
|
|
2
|
+
codecrate/_version.py,sha256=m8HxkqoKGw_wAJtc4ZokpJKNLXqp4zwnNhbnfDtro7w,704
|
|
3
|
+
codecrate/cli.py,sha256=0QCw4y4NJsiEM_dKOdF6qmJXPXeEoRBYC6cAH5rMKqg,8377
|
|
4
|
+
codecrate/config.py,sha256=8VOmpjHC3am6LRFnyHUY3376947XTvSFGp3fUxSZgOk,3523
|
|
5
5
|
codecrate/diffgen.py,sha256=xMH-wJeMox_xoMLrGck2o7RP5mjlCJjndSHPHql9CJg,3432
|
|
6
6
|
codecrate/discover.py,sha256=eWebPPbPHy5WrtbCX-RA1hKiPyQau6buUm5OcjpVi9U,2847
|
|
7
7
|
codecrate/ids.py,sha256=fO_PAaskT7hLXgvJN7Hv4HD27zPIFnSziB0k2AUpONo,517
|
|
@@ -10,15 +10,15 @@ codecrate/markdown.py,sha256=2ruEmsCF9v-aPpiKEOGusi4T13wEzugNn7JSN6T7KGg,16670
|
|
|
10
10
|
codecrate/mdparse.py,sha256=Lu9aN3rMP5qetwLapVrRvVRohPXv8L0hmjG0GUG7jys,4746
|
|
11
11
|
codecrate/model.py,sha256=Px9xL4odcvlDgEnSiwd5SMi9_k1Xck4R8DOlahN9Z-4,897
|
|
12
12
|
codecrate/packer.py,sha256=an-E1ZilIOY2hdjF4Gt3J5APOCTRRpiinmvfBiw29Ds,3398
|
|
13
|
-
codecrate/parse.py,sha256=
|
|
13
|
+
codecrate/parse.py,sha256=7baMIxRQoZGNAgFsydalC6cYZGRqDF4KWz8qhpzLDRw,4586
|
|
14
14
|
codecrate/stubber.py,sha256=9WxpQs6FTCT0OUX4Si8GdD63VyUJQnNqRcwTm_IPuKc,2857
|
|
15
15
|
codecrate/token_budget.py,sha256=0vG9h7l5yNn909QQEItrYQJIjMT2h5LcM9iZf4zu-3c,12937
|
|
16
16
|
codecrate/udiff.py,sha256=bMvwhgqXZw2pIW5VcRRATUoDspM2XGQU3nInD_A7WWo,6249
|
|
17
17
|
codecrate/unpacker.py,sha256=soh6qwRE6sxoBAbr3UbXk1O5aiwdnfUhkqfFdSvU0_I,5063
|
|
18
18
|
codecrate/validate.py,sha256=-KVU7RQ8zJG-YJoD8kLCYgE0OWWdy-yYzl0gyp-3mWo,4250
|
|
19
|
-
codecrate-0.1.
|
|
20
|
-
codecrate-0.1.
|
|
21
|
-
codecrate-0.1.
|
|
22
|
-
codecrate-0.1.
|
|
23
|
-
codecrate-0.1.
|
|
24
|
-
codecrate-0.1.
|
|
19
|
+
codecrate-0.1.1.dist-info/licenses/LICENSE,sha256=O6yVC2oL8vUoAA3oPEvLSbvxzmwtOOPiY7dOZzgrxi0,1074
|
|
20
|
+
codecrate-0.1.1.dist-info/METADATA,sha256=xFktVoakgBrUyCAMZpcecQMjAyXMYOYt3fv80n0H9MI,9394
|
|
21
|
+
codecrate-0.1.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
22
|
+
codecrate-0.1.1.dist-info/entry_points.txt,sha256=DcY9tib-PzdLebck4B2RYJ0CGH6cqAJMCHPU3MdA0Dk,49
|
|
23
|
+
codecrate-0.1.1.dist-info/top_level.txt,sha256=-jD2a_aH1iQN4atRhGw7ZhEYnOWe88nfmkz6sPZ6WEg,10
|
|
24
|
+
codecrate-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|