Skip to content

fix: correct nullable resolved directory annotation - #3771

Open
marcelsafin wants to merge 1 commit into
github:mainfrom
marcelsafin:fix/nullable-resolved-dir
Open

fix: correct nullable resolved directory annotation#3771
marcelsafin wants to merge 1 commit into
github:mainfrom
marcelsafin:fix/nullable-resolved-dir

Conversation

@marcelsafin

Copy link
Copy Markdown
Contributor

Description

CommandRegistrar.register_commands() accepts None for its internal
_resolved_dir override, but annotated the parameter as Path. This corrects
the type contract to Optional[Path], matching the existing default and nearby
optional parameters. Runtime behavior is unchanged.

The regression test resolves the runtime type hints and verifies that
_resolved_dir accepts None.

Testing

  • Tested locally with uv run specify --help
  • Ran existing tests with uv sync && uv run pytest
  • Tested with a sample project (if applicable)

Full suite: 5422 passed, 172 skipped.

AI Disclosure

  • I did not use AI assistance for this contribution
  • I did use AI assistance (describe below)

GitHub Copilot (GPT-5.6 Sol) autonomously identified, implemented, tested, and
self-reviewed this change on behalf of @marcelsafin.

Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@marcelsafin
marcelsafin requested a review from mnriem as a code owner July 28, 2026 07:53
Copilot AI review requested due to automatic review settings July 28, 2026 07:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Corrects CommandRegistrar.register_commands() typing to reflect its existing nullable default; runtime behavior is unchanged.

Changes:

  • Annotates _resolved_dir as Optional[Path].
  • Adds a regression test verifying the resolved type accepts None.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/specify_cli/agents.py Corrects the nullable parameter annotation.
tests/test_agent_config_consistency.py Tests the corrected type contract.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants