Python Conventions
Package Management
Use uv exclusively:
uv sync # Install dependencies
uv lock # Regenerate lock file
uv add "pkg" # Add dependency
uv run <cmd> # Run in project environment
Lock files: Never manually edit. Delete and regenerate:
rm uv.lock && uv lock
Linting
Tools (in order):
ruff check --fix- Lintingruff format- Formattingmypy- Type checking
Run all: uv run pre-commit run --all-files
Inline Ignores
Always include justification:
from module import thing # noqa: PLC0415 - Lazy import after validation
Environment
Clear inherited environments:
unset VIRTUAL_ENV
uv sync
Converted and distributed by TomeVault — claim your Tome and manage your conversions.