{"enrichment":{"faq":[{"a":"mypy is a static type checker for Python that analyzes your code before runtime to catch type errors. It brings static type checking to Python through gradual adoption of type hints, letting you add type safety incrementally without rewriting existing code. mypy uses type inference to minimize annotation overhead while supporting strict mode for maximum safety.","q":"What is mypy and how does static type checking python work?"},{"a":"mypy catches type errors before runtime in FastAPI and Django applications by analyzing function signatures, variable assignments, and API endpoint definitions against their declared types. When you annotate your route handlers, request models, and database queries with type hints, mypy validates that arguments match expected types and return values conform to contracts, preventing runtime failures in production.","q":"How can mypy catch type errors before runtime in FastAPI and Django?"},{"a":"mypy can be configured with strict mode settings in a mypy.ini or pyproject.toml file, then integrated into your CI/CD pipeline as a build step. Set options like `strict = True`, `disallow_untyped_defs`, and `disallow_incomplete_defs` to enforce comprehensive type coverage. Run mypy in your pipeline before tests or deployment to block code that fails type validation.","q":"How do I configure and enforce strict type checking in CI/CD pipelines?"},{"a":"mypy supports Python type annotations including Optional, Union, List, Dict, and custom types. It handles generics through TypeVar for parameterized types, Protocol for structural typing, and advanced patterns like bounded TypeVars, type aliases, and overloads. mypy also supports type stubs for untyped libraries and can infer types automatically when explicit annotations aren't provided.","q":"What type annotations, generics, and advanced typing patterns does mypy support?"},{"a":"mypy integrates with most IDEs through plugins and language servers. Many editors like VS Code, PyCharm, and Vim can run mypy in real-time as you type, showing type errors immediately. Configure mypy in your project's configuration file, then enable the mypy plugin in your IDE settings to get instant feedback on type violations during development.","q":"How can I integrate mypy with my IDE and development workflow?"},{"a":"mypy is the original and most widely-adopted Python type checker, supporting gradual typing and extensive configuration options. Other tools like Pyright offer different trade-offs in speed and strictness. mypy's strength lies in its mature ecosystem, broad library support through type stubs, and flexibility for incremental adoption across large codebases.","q":"What's the difference between mypy and other python type checking tools?"}],"shadow_tags":["static-analysis-tool","runtime-error-prevention","code-quality-assurance","framework-type-support","incremental-adoption","type-safety-enforcement","developer-experience","ci-pipeline-integration"],"summary_rewrite":"mypy brings static type checking to Python through gradual adoption of type hints, letting you add type safety incrementally without rewriting existing code. It supports strict mode for maximum safety, works seamlessly with FastAPI and Django, and uses type inference to minimize annotation overhead."},"files":[{"bytes":29031,"path":"toolchains/python/tooling/mypy/SKILL.md","sha256":"78defdc92088fecf8fc01eda4a8ca7a6ce7c4db1490b221dc11ab79d497d8daa","url":"https://skillfed.io/files/bobmatnyc/claude-mpm-skills/mypy/530d3f14/SKILL.md"}],"id":"bobmatnyc/claude-mpm-skills/mypy","links":{"html":"https://skillfed.io/bobmatnyc/claude-mpm-skills/mypy","md":"https://skillfed.io/bobmatnyc/claude-mpm-skills/mypy.md","repo":"https://github.com/bobmatnyc/claude-mpm-skills"},"meta":{"agents_supported":[],"first_seen":"2026-07-28","forks":18,"language":"Python","last_updated":"2026-07-18","license":"MIT","name":"mypy","publisher":"bobmatnyc","stars":62},"relations":{"similar":[{"id":"JosiahSiegel/claude-plugin-marketplace/python-type-hints"},{"id":"bobmatnyc/claude-mpm-skills/pyright"},{"id":"xu-xiang/everything-claude-code-zh/python-patterns"},{"id":"affaan-m/ECC/python-patterns"},{"id":"personamanagmentlayer/pcl/python-expert"},{"id":"wshobson/agents/python-type-safety"},{"id":"miles990/claude-software-skills/python"},{"id":"irahardianto/awesome-agv/python-idioms"},{"id":"bobmatnyc/claude-mpm-skills/pydantic"},{"id":"alinaqi/maggy/python"}]},"slug":{"owner":"bobmatnyc","repo":"claude-mpm-skills","skill":"mypy"},"version":"530d3f14"}
