mirror of
https://github.com/github/spec-kit.git
synced 2026-08-03 06:26:30 +08:00
fix: correct nullable resolved directory annotation (#3771)
Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -599,7 +599,7 @@ class CommandRegistrar:
|
||||
source_dir: Path,
|
||||
project_root: Path,
|
||||
context_note: Optional[str] = None,
|
||||
_resolved_dir: Path = None,
|
||||
_resolved_dir: Optional[Path] = None,
|
||||
link_outputs: bool = False,
|
||||
extension_id: Optional[str] = None,
|
||||
) -> List[str]:
|
||||
|
||||
@@ -2,10 +2,12 @@
|
||||
|
||||
import re
|
||||
from pathlib import Path
|
||||
from typing import get_args, get_type_hints
|
||||
|
||||
import yaml
|
||||
|
||||
from specify_cli import AGENT_CONFIG
|
||||
from specify_cli.agents import CommandRegistrar as AgentCommandRegistrar
|
||||
from specify_cli.extensions import CommandRegistrar
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
@@ -104,6 +106,14 @@ def _supported_agent_names_from_agent_request_template() -> list[str]:
|
||||
class TestAgentConfigConsistency:
|
||||
"""Ensure agent configuration stays synchronized across key surfaces."""
|
||||
|
||||
def test_register_commands_resolved_dir_annotation_accepts_none(self):
|
||||
"""The internal resolved-directory override defaults to None."""
|
||||
resolved_dir_type = get_type_hints(
|
||||
AgentCommandRegistrar.register_commands
|
||||
)["_resolved_dir"]
|
||||
|
||||
assert type(None) in get_args(resolved_dir_type)
|
||||
|
||||
def test_issue_template_agent_lists_match_runtime_integrations(self):
|
||||
"""GitHub issue templates should list all concrete built-in agents."""
|
||||
concrete_agent_keys = set(AGENT_CONFIG) - {"generic"}
|
||||
|
||||
Reference in New Issue
Block a user