python-best-practices
Write clear, typed, maintainable Python. Use whenever you write, change, refactor, debug, or explain Python code: modules, functions, classes, type hints, dataclasses, errors, comprehensions, imports, pyproject.toml, or scripts. Trigger on Python, .py files, uv, ruff, type checkers, pandas, or notebooks turned into modules, even without the words "best practices".
Pinned to revision 1858e2ad4849, so it is the text this page describes rather than whatever the author pushed since.
Files
Every link opens the file at its source, pinned to the revision this page describes.