Skip to content

Commit f08de91

Browse files
Fix core inventory command source
Assisted-by: GitHub Copilot (model: unknown, autonomous) Co-authored-by: nicolehaugen <10600161+nicolehaugen@users.noreply.github.com>
1 parent 6048674 commit f08de91

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/specify_cli/core/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,9 @@ def build_core_inventory() -> dict[str, Any]:
524524
"""
525525
layout = _resolve_core_root()
526526

527-
from ..extensions import _load_core_command_names # lazy: avoid import cycle
527+
from ..extensions import CORE_COMMAND_NAMES # lazy: avoid import cycle
528528

529-
command_names = sorted(_load_core_command_names())
529+
command_names = sorted(CORE_COMMAND_NAMES)
530530
commands = [_build_command_entry(name, layout) for name in command_names]
531531
templates = _build_template_entries(layout)
532532
scripts = _build_script_entries(layout)

‎tests/test_core_inventory.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def use(root: Path) -> None:
7878
if p.is_file()
7979
)
8080
monkeypatch.setattr(
81-
"specify_cli.extensions._load_core_command_names", lambda: names
81+
"specify_cli.extensions.CORE_COMMAND_NAMES", names
8282
)
8383

8484
return use
@@ -309,8 +309,8 @@ def test_missing_command_file_exits_with_envelope(tmp_path: Path, monkeypatch: p
309309
)
310310
monkeypatch.setattr(core_pkg, "_resolve_core_root", lambda: layout)
311311
monkeypatch.setattr(
312-
"specify_cli.extensions._load_core_command_names",
313-
lambda: frozenset({"ghost"}),
312+
"specify_cli.extensions.CORE_COMMAND_NAMES",
313+
frozenset({"ghost"}),
314314
)
315315
with pytest.raises(CoreInventoryError) as excinfo:
316316
build_core_inventory()

0 commit comments

Comments
 (0)