馃敡 Where my dotfiles lives in harmony and peace, most of the time
at main 15 lines 631 B view raw view rendered
1--- 2name: modern-python 3description: Use when writing, reviewing, or refactoring Python to ensure adherence to modern best practices (type syntax, `uv` instead of `python`, linting, formatting, etc.) 4--- 5 6- Never use `python`. Use `uv` instead of `python` 7 - `uv add package-name` 8 - `uv run script.py` 9- Don't use `from __future__ import annotations` 10- Use modern type syntax (`list[str], str | None`) 11- Format with `uvx ruff format .` 12- Lint with `uvx ruff check .` and `uvx ty check` 13- Look before you leap (check conditions before acting) 14- Default to no backwards compatibility preservation 15- Declare variables close to use