python-type-hints
CommunityWrite modern Python type hints with confidence.
Authoramaozhao
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Writing Python code with clear, strong type hints reduces runtime errors and improves maintainability, especially when leveraging Python 3.12+ features like PEP 695 type parameters, TypedDict with Required/NotRequired/ReadOnly, Final, Self, and LiteralString.
Core Features & Use Cases
- Modern syntax support: unions with |, type aliases via type, and TypedDict enhancements for precise input shapes.
- Advanced type constructs: Final constants and Self type to support fluent APIs and safe recursive patterns.
- Safe SQL hints: LiteralString for restricting risky or dynamic SQL text.
- Use cases: applying strong typing in new projects, gradually typing existing code, or designing robust library APIs.
Quick Start
Create a small Python snippet that demonstrates a function using a union type, a TypedDict with a required field and an optional field, and a class method using Self. Run a type checker (e.g., mypy or Pyright) to observe type validations.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: python-type-hints Download link: https://github.com/amaozhao/MySkills/archive/main.zip#python-type-hints Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.