Skip to content

chore(types): Phase 3 of #415, type loader - #460

Merged
rosspeili merged 3 commits into
ARPAHLS:mainfrom
UroojFatima-052:core/issue-415-phase3-mypy
Oct 29, 2026
Merged

rosspeili merged 3 commits into
ARPAHLS:mainfrom
UroojFatima-052:core/issue-415-phase3-mypy

Conversation

@UroojFatima-052

Copy link
Copy Markdown
Contributor

Refs #415

Phase 3: removes skillware.core.loader from [[tool.mypy.overrides]] and fixes the 2 errors that surfaced. Typing only, no behavior change.

Changes

  • loader.py (load_skill): manifest: Dict[str, Any] = {}. mypy can't infer the type of an empty dict literal, so it's annotated explicitly.
  • loader.py (to_gemini_tool): the function declaration dict is passed through types.FunctionDeclaration.model_validate(...) before going into types.Tool. Tool.function_declarations is typed as a list of FunctionDeclaration, and pydantic was already coercing the dict at runtime, so this does the same conversion explicitly. Output is unchanged: test_to_gemini_tool still sees OBJECT / STRING types.
  • pyproject.toml: loader dropped from the overrides list.
  • CHANGELOG.md: Unreleased entry.

Verification

  • mypy skillware: Success, no issues in 25 files
  • black --check / flake8 on loader.py: clean
  • pytest tests/test_loader.py: 35 passed

Only skillware.cli remains in the overrides list now (Phase 4).

@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, merging as is. <3

@rosspeili
rosspeili merged commit 6a69106 into ARPAHLS:main Oct 29, 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