Run mypy type checking with systematic error resolution
Runs mypy type checking and systematically resolves errors by category.
/plugin marketplace add tachyon-beep/skillpacks/plugin install axiom-python-engineering@foundryside-marketplace[path or file] - defaults to current directoryRun mypy and systematically resolve type errors. Don't just add type: ignore everywhere.
Run mypy
mypy ${ARGUMENTS:-.} --show-error-codes 2>&1 || true
Assess error count and categories
Systematic resolution by category
For few errors (<20): Fix individually, understanding each one.
For many errors (20+): Fix by category:
import errors (missing stubs)arg-type errors (function call mismatches)return-value errorsassignment errorsWhen to use type: ignore
Only suppress when:
Always include the error code:
result = dynamic_func() # type: ignore[no-untyped-call] # TODO: add stubs
For comprehensive mypy error resolution:
Load skill: axiom-python-engineering:using-python-engineering
Then read: resolving-mypy-errors.md
For type hint syntax and patterns:
Then read: modern-syntax-and-types.md
User: /python-engineering:typecheck src/
Claude:
1. Running mypy src/ --show-error-codes...
2. Found 34 errors:
- arg-type: 15 errors
- return-value: 8 errors
- import: 6 errors (missing stubs)
- assignment: 5 errors
3. Starting with import errors (missing stubs)...
- Installing types-requests, types-redis
- Or adding to pyproject.toml [tool.mypy] ignore_missing_imports for untyped libs
4. Re-running mypy... import errors cleared.
Moving to arg-type errors...