Modern Python

Work with Python (`uv` instead of `python`, modern type syntax, linting, formatting, etc.) properly!

majiayu000 Updated 567 repo stars

File contents

  • Never use python. Use uv instead of python
    • uv add package-name
    • uv run script.py
  • Don't use from __future__ import annotations
  • Use modern type syntax (list[str], str | None)
  • Format with uvx ruff format .
  • Lint with uvx ruff check . and uvx ty check
  • Look before you leap (check conditions before acting)

majiayu000/claude-skill-registry-data/tree/main/data/modern-python commit 0001ba1314

Frequently asked questions

npx skillmds@latest add majiayu000/modern-python-3