This skill provides comprehensive guidance on Python type hints and static type checking for Python 3.9+ codebases. It serves as a reference during code reviews to ensure proper type annotation usage, evaluate type hint quality, and promote best practices for gradual typing adoption.
This skill should be referenced by the uncle-duke-python agent when:
Type hints (introduced in PEP 484) enable static type checking in Python while maintaining the language's dynamic nature. Modern Python (3.9+) has significantly improved type hint syntax with built-in generic types and the union operator. Proper type hints improve:
Комплексное справочное руководство по подсказкам типов Python, статической проверке типов с помощью mypy, современным шаблонам аннотаций типов (PEP 484, 585, 604, 612, 613) и лучшим практикам подсказок типов для Python 3.9+. Используйте во время проверки кода, чтобы обеспечить правильное использование аннотаций типов, оценить конфигурацию mypy и выявить антишаблоны подсказок типов. Источник: clostaunau/holiday-card.