File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -599,7 +599,7 @@ def register_commands(
599599 source_dir : Path ,
600600 project_root : Path ,
601601 context_note : Optional [str ] = None ,
602- _resolved_dir : Path = None ,
602+ _resolved_dir : Optional [ Path ] = None ,
603603 link_outputs : bool = False ,
604604 extension_id : Optional [str ] = None ,
605605 ) -> List [str ]:
Original file line number Diff line number Diff line change 22
33import re
44from pathlib import Path
5+ from typing import get_args , get_type_hints
56
67import yaml
78
89from specify_cli import AGENT_CONFIG
10+ from specify_cli .agents import CommandRegistrar as AgentCommandRegistrar
911from specify_cli .extensions import CommandRegistrar
1012
1113REPO_ROOT = Path (__file__ ).resolve ().parent .parent
@@ -104,6 +106,14 @@ def _supported_agent_names_from_agent_request_template() -> list[str]:
104106class TestAgentConfigConsistency :
105107 """Ensure agent configuration stays synchronized across key surfaces."""
106108
109+ def test_register_commands_resolved_dir_annotation_accepts_none (self ):
110+ """The internal resolved-directory override defaults to None."""
111+ resolved_dir_type = get_type_hints (
112+ AgentCommandRegistrar .register_commands
113+ )["_resolved_dir" ]
114+
115+ assert type (None ) in get_args (resolved_dir_type )
116+
107117 def test_issue_template_agent_lists_match_runtime_integrations (self ):
108118 """GitHub issue templates should list all concrete built-in agents."""
109119 concrete_agent_keys = set (AGENT_CONFIG ) - {"generic" }
You can’t perform that action at this time.
0 commit comments