davidgasquez

modern-python

Use when writing, reviewing, or refactoring Python to ensure adherence to modern best practices (type syntax, `uv` instead of `python`, linting, formatting, etc.)

davidgasquez 61 2 Actualitzat fa 8 mesos
GitHub

Instal·la

npx skillscat add davidgasquez/dotfiles/modern-python

Instal·la des del registre de SkillsCat.

SKILL.md
  • 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)
  • Default to no backwards compatibility preservation
  • Declare variables close to use