Python · Section 17
Code Quality and Tooling
PEP 8 and the formatters/linters that enforce it (Black, isort, Ruff, Flake8, pre-commit), static analysis (mypy, pyright, security linters), and the engineering practices — code review, naming, cohesive functions, refactoring — that keep code readable and safe to change.
This section
- Formatting and lintingPEP 8 as the style guide, Black/isort/Ruff/Flake8 as the tools that enforce it automatically, and pre-commit as the mechanism that runs them before every commit — verified against real, intentionally messy Python files in this environment.2 core1 standard3 concepts
- Static analysismypy and pyright catch type errors before code runs; a security linter (bandit) catches dangerous patterns — both without executing a single line.2 core2 concepts
- Engineering practicesThe human-facing half of code quality — code review, clear naming, type annotations, documentation, small cohesive functions, consistent structure, avoiding premature abstraction, and refactoring/technical debt.3 core3 concepts

