From 11687a803f810f9e8ac0a770d19d75f5829d1bce Mon Sep 17 00:00:00 2001 From: Quratulain-bilal Date: Mon, 27 Jul 2026 22:33:49 +0500 Subject: [PATCH] fix: correct Optional type annotation for context_note parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The context_note parameter in CommandRegistrar methods was annotated as \str = None\ which is a type lie — the default is None but the type hint says str. Static type checkers (mypy/pyright) would flag this as an error. Changed to \Optional[str] = None\ for correctness, consistent with how extension_id (same class) is already typed. --- src/specify_cli/agents.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/specify_cli/agents.py b/src/specify_cli/agents.py index 09429f7a69..9b17fcf4e7 100644 --- a/src/specify_cli/agents.py +++ b/src/specify_cli/agents.py @@ -270,7 +270,7 @@ def rewrite_extension_paths( return text def render_markdown_command( - self, frontmatter: dict, body: str, source_id: str, context_note: str = None + self, frontmatter: dict, body: str, source_id: str, context_note: Optional[str] = None ) -> str: """Render command in Markdown format. @@ -597,7 +597,7 @@ def register_commands( source_id: str, source_dir: Path, project_root: Path, - context_note: str = None, + context_note: Optional[str] = None, _resolved_dir: Path = None, link_outputs: bool = False, extension_id: Optional[str] = None, @@ -1016,7 +1016,7 @@ def register_commands_for_all_agents( source_id: str, source_dir: Path, project_root: Path, - context_note: str = None, + context_note: Optional[str] = None, link_outputs: bool = False, create_missing_active_skills_dir: bool = False, extension_id: Optional[str] = None,