invar-tools 1.17.24__py3-none-any.whl → 1.17.25__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.
- invar/shell/config.py +31 -13
- {invar_tools-1.17.24.dist-info → invar_tools-1.17.25.dist-info}/METADATA +1 -1
- {invar_tools-1.17.24.dist-info → invar_tools-1.17.25.dist-info}/RECORD +8 -8
- {invar_tools-1.17.24.dist-info → invar_tools-1.17.25.dist-info}/WHEEL +0 -0
- {invar_tools-1.17.24.dist-info → invar_tools-1.17.25.dist-info}/entry_points.txt +0 -0
- {invar_tools-1.17.24.dist-info → invar_tools-1.17.25.dist-info}/licenses/LICENSE +0 -0
- {invar_tools-1.17.24.dist-info → invar_tools-1.17.25.dist-info}/licenses/LICENSE-GPL +0 -0
- {invar_tools-1.17.24.dist-info → invar_tools-1.17.25.dist-info}/licenses/NOTICE +0 -0
invar/shell/config.py
CHANGED
|
@@ -435,24 +435,42 @@ _DEFAULT_EXCLUDE_PATHS = [
|
|
|
435
435
|
]
|
|
436
436
|
|
|
437
437
|
|
|
438
|
+
# @shell_complexity: Config fallthrough requires checking multiple sources
|
|
438
439
|
def _get_classification_config(project_root: Path) -> Result[dict[str, Any], str]:
|
|
439
|
-
"""Get classification-related config (paths and patterns).
|
|
440
|
-
find_result = _find_config_source(project_root)
|
|
441
|
-
if isinstance(find_result, Failure):
|
|
442
|
-
return Success({}) # Return empty on error
|
|
443
|
-
config_path, source = find_result.unwrap()
|
|
440
|
+
"""Get classification-related config (paths and patterns).
|
|
444
441
|
|
|
445
|
-
if
|
|
446
|
-
|
|
442
|
+
Uses fallthrough logic: if pyproject.toml exists but has no [tool.invar.guard],
|
|
443
|
+
continues to check invar.toml and .invar/config.toml.
|
|
444
|
+
"""
|
|
445
|
+
# Build list of config sources to try (same order as load_config)
|
|
446
|
+
sources_to_try: list[tuple[Path, ConfigSource]] = []
|
|
447
|
+
|
|
448
|
+
pyproject = project_root / "pyproject.toml"
|
|
449
|
+
if pyproject.exists():
|
|
450
|
+
sources_to_try.append((pyproject, "pyproject"))
|
|
447
451
|
|
|
448
|
-
|
|
449
|
-
|
|
452
|
+
invar_toml = project_root / "invar.toml"
|
|
453
|
+
if invar_toml.exists():
|
|
454
|
+
sources_to_try.append((invar_toml, "invar"))
|
|
450
455
|
|
|
451
|
-
|
|
452
|
-
|
|
456
|
+
invar_config = project_root / ".invar" / "config.toml"
|
|
457
|
+
if invar_config.exists():
|
|
458
|
+
sources_to_try.append((invar_config, "invar_dir"))
|
|
459
|
+
|
|
460
|
+
# Try each source, fallback if no guard config found
|
|
461
|
+
for config_path, source in sources_to_try:
|
|
462
|
+
result = _read_toml(config_path)
|
|
463
|
+
if isinstance(result, Failure):
|
|
464
|
+
continue # Skip unreadable files
|
|
465
|
+
|
|
466
|
+
data = result.unwrap()
|
|
467
|
+
guard_config = extract_guard_section(data, source)
|
|
468
|
+
|
|
469
|
+
if guard_config: # Found valid guard config
|
|
470
|
+
return Success(guard_config)
|
|
453
471
|
|
|
454
|
-
|
|
455
|
-
return Success(
|
|
472
|
+
# No config found in any source, return empty dict
|
|
473
|
+
return Success({})
|
|
456
474
|
|
|
457
475
|
|
|
458
476
|
def get_path_classification(project_root: Path) -> Result[tuple[list[str], list[str]], str]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: invar-tools
|
|
3
|
-
Version: 1.17.
|
|
3
|
+
Version: 1.17.25
|
|
4
4
|
Summary: AI-native software engineering tools with design-by-contract verification
|
|
5
5
|
Project-URL: Homepage, https://github.com/tefx/invar
|
|
6
6
|
Project-URL: Documentation, https://github.com/tefx/invar#readme
|
|
@@ -2657,7 +2657,7 @@ invar/node_tools/quick-check/cli.js,sha256=dwV3hdJleFQga2cKUn3PPfQDvvujhzKdjQcIv
|
|
|
2657
2657
|
invar/node_tools/ts-analyzer/cli.js,sha256=SvZ6HyjmobpP8NAZqXFiy8BwH_t5Hb17Ytar_18udaQ,4092887
|
|
2658
2658
|
invar/shell/__init__.py,sha256=FFw1mNbh_97PeKPcHIqQpQ7mw-JoIvyLM1yOdxLw5uk,204
|
|
2659
2659
|
invar/shell/claude_hooks.py,sha256=hV4DfG3cVng32f0Rxoo070tliVlYFC5v9slIWEbAD7E,18899
|
|
2660
|
-
invar/shell/config.py,sha256=
|
|
2660
|
+
invar/shell/config.py,sha256=fPKY1AAqM28vcIIasvitYqqCv3g5VAjCdS8M7dNbQWA,19331
|
|
2661
2661
|
invar/shell/contract_coverage.py,sha256=81OQkQqUVYUKytG5aiJyRK62gwh9UzbSG926vkvFTc8,12088
|
|
2662
2662
|
invar/shell/coverage.py,sha256=m01o898IFIdBztEBQLwwL1Vt5PWrpUntO4lv4nWEkls,11344
|
|
2663
2663
|
invar/shell/doc_tools.py,sha256=16gvo_ay9-_EK6lX16WkiRGg4OfTAKK_i0ucQkE7lbI,15149
|
|
@@ -2778,10 +2778,10 @@ invar/templates/skills/invar-reflect/template.md,sha256=Rr5hvbllvmd8jSLf_0ZjyKt6
|
|
|
2778
2778
|
invar/templates/skills/investigate/SKILL.md.jinja,sha256=cp6TBEixBYh1rLeeHOR1yqEnFqv1NZYePORMnavLkQI,3231
|
|
2779
2779
|
invar/templates/skills/propose/SKILL.md.jinja,sha256=6BuKiCqO1AEu3VtzMHy1QWGqr_xqG9eJlhbsKT4jev4,3463
|
|
2780
2780
|
invar/templates/skills/review/SKILL.md.jinja,sha256=ET5mbdSe_eKgJbi2LbgFC-z1aviKcHOBw7J5Q28fr4U,14105
|
|
2781
|
-
invar_tools-1.17.
|
|
2782
|
-
invar_tools-1.17.
|
|
2783
|
-
invar_tools-1.17.
|
|
2784
|
-
invar_tools-1.17.
|
|
2785
|
-
invar_tools-1.17.
|
|
2786
|
-
invar_tools-1.17.
|
|
2787
|
-
invar_tools-1.17.
|
|
2781
|
+
invar_tools-1.17.25.dist-info/METADATA,sha256=t7Kc8ideD0woPDbz-PQiXfyQzlyBOPis0VZjDQHHCPU,28582
|
|
2782
|
+
invar_tools-1.17.25.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
2783
|
+
invar_tools-1.17.25.dist-info/entry_points.txt,sha256=RwH_EhqgtFPsnO6RcrwrAb70Zyfb8Mh6uUtztWnUxGk,102
|
|
2784
|
+
invar_tools-1.17.25.dist-info/licenses/LICENSE,sha256=qeFksp4H4kfTgQxPCIu3OdagXyiZcgBlVfsQ6M5oFyk,10767
|
|
2785
|
+
invar_tools-1.17.25.dist-info/licenses/LICENSE-GPL,sha256=IvZfC6ZbP7CLjytoHVzvpDZpD-Z3R_qa1GdMdWlWQ6Q,35157
|
|
2786
|
+
invar_tools-1.17.25.dist-info/licenses/NOTICE,sha256=joEyMyFhFY8Vd8tTJ-a3SirI0m2Sd0WjzqYt3sdcglc,2561
|
|
2787
|
+
invar_tools-1.17.25.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|