Skip to content

chore(types): Phase 4 of #415, type cli and remove overrides - #470

Merged
rosspeili merged 2 commits into
ARPAHLS:mainfrom
UroojFatima-052:chore/issue-415-phase4-mypy
Nov 9, 2026
Merged

rosspeili merged 2 commits into
ARPAHLS:mainfrom
UroojFatima-052:chore/issue-415-phase4-mypy

Conversation

@UroojFatima-052

Copy link
Copy Markdown
Contributor

Refs #415

Phase 4: removes skillware.cli from the mypy overrides and fixes the 3 errors that surfaced. Typing only, no behavior change.

Changes

  • cli.py (_resolve_pytest_targets): the second searched: List[Path] = [] drops its annotation, since searched is already declared with that type in the earlier skill_id branch of the same function (no-redef).
  • cli.py (config submenu): child_nav: Optional[Union[int, str]] = None. cmd_addressbook_interactive returns int | str, while the other submenus return Optional[str], so mypy rejected the assignment. This one wasn't in the issue list; it showed up once the override was removed. child_nav is only compared against _NAV_EXIT, which works for all three types.
  • cli.py (_lerp_rgb): returns an explicit 3-element tuple instead of tuple(... for i in range(3)), so the return type is Tuple[int, int, int] rather than Tuple[int, ...]. Same values.
  • pyproject.toml: cli was the last module in [[tool.mypy.overrides]], and mypy rejects an override with an empty module list, so the whole block is removed here. Phase 5 then only needs to enable check_untyped_defs and disallow_incomplete_defs.
  • CHANGELOG.md: Unreleased entry.

Verification

  • mypy skillware: Success, no issues in 25 files (no overrides)
  • black --check / flake8 on cli.py: clean
  • pytest tests/test_cli.py: 138 passed

@rosspeili rosspeili 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.

LGTM! @UroojFatima-052, thanks a lot. Merging as is.

@rosspeili
rosspeili merged commit 50867aa into ARPAHLS:main Nov 9, 2026
7 checks passed
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