Teach Your Old Code New Tricks: Automating Code Quality in Large Projects
summary
Practical roadmap for adding linters and formatters to a large Python monorepo: use pre-commit to create isolated tool environments, run ruff/black/isort and mypy via a shared pyproject config, and avoid noisy churn with a baseline/ignore strategy and git-blame-ignore-revs. Example numbers: a 50-developer codebase with ~1.2M Python lines and ruff has ~800 rules (about 300 worth tuning for the repo). Strategies that work: incremental rollouts by path, check‑only on changed files, and automated fixes for safe rules. Tools and scripts (including a custom audit tool) prove effective at reducing technical debt.
AI-written summary · about
chapters (8)
- 0:00Introduction to code quality
- 1:56What is quality code
- 4:46Tools for code quality
- 7:38Git hooks and pre-commit
- 11:56Adding new tools to old code
- 13:44Challenges in large projects
- 16:16Incremental adoption strategies
- 19:08Team communication and culture
related talks
29mManaging the code quality of your project. Leave the past behind: Focus on new code.
27mPython Linters at Scale
51mTaking Python beyond scripting
30mAutomating Code Quality
42mInheriting a Sloppy Codebase: A Practical Guide to Wrangling Chaotic Code
34mScaling the Mountain: A Framework for Tackling Large-Scale Tech Debt
40mCode Review Skills for Pythonistas
27mPyre, Lints, Codemods, Code Quality, and You
