antrophiclove
← Kütüphaneye dön
Kurulum
mkdir -p .claude/commands && curl -sL https://www.antrophiclove.com/api/kaynak/type-hints/raw -o .claude/commands/type-hints.md

Hedef dosya: .claude/commands/type-hints.md

Add comprehensive type hints to Python code for better IDE support and type safety.

Steps

  1. Analyze the target Python file for untyped code:
  2. Determine types by analyzing usage:
  3. Add function signatures:
  4. Add complex types:
  5. Add class-level type hints:
  6. Verify with mypy or pyright:
  7. Update docstrings to match type annotations.

Format

File: <path>
Functions Typed: <count>
Classes Typed: <count>
Type Checker: <mypy|pyright> - <pass|N errors>

Rules

  • Use modern syntax (str | None) for Python 3.10+ projects.
  • Use typing imports for older Python versions.
  • Avoid Any unless truly necessary; be specific.