···11+---
22+name: modern-python
33+description: How to work with Python (`uv` instead of `python`, modern type syntax, linting, formatting, etc.)
44+---
55+66+- Use `uv` instead of `python`
77+ - `uv add package-name`
88+ - `uv run script.py`
99+- Don't use `from __future__ import annotations`
1010+- Use modern type syntax (`list[str], str | None`)
1111+- Format with `uvx ruff format .`
1212+- Lint with `uvx ruff check .` and `uvx ty check`
1313+- Look before you leap (check conditions before acting)