Python Linters at Scale
summary
Covers using Black, Flake8, isort, and Mypy across many repositories and developers by building a reusable linter framework that automates updates and shared configurations, runs linters only on changed code to speed up analysis, collects logs/metrics for observability, and applies automatic fixes for common issues. Describes configuration recommendations for these linters and practical solutions for scaling linting to thousands of runs across millions of lines of code.
AI-written summary · about
chapters (26)
- 0:00Intro
- 1:42Python Codebases
- 2:18Black: code formatting
- 2:45isort: import sorting
- 3:16Flake8: code style, syntax errors and bugs
- 3:52mypy: type checking
- 4:25Version Control
- 5:44Continuous Integration (CI) Runs
- 6:31Large Codebase
- 6:47Multiple Codebases
- 8:36Checklist for Speeding up Linters
- 9:09Only run necessary analysis on updated code
- 10:06pre-commit: manage pre-commit hooks
- 10:51Remote Cache
- 12:07Ruff: fast linter implementation using rust
- 12:55Checklist for Improving Developer Experience
- 13:43Understand Developer Experience
- 15:01fixit: Python linters and autofixes using LibCST
- 16:02Our Custom Python Linters: Github Check with annotations
- 16:57Our Custom non-Python Linters: rebase reminder
- 18:53Our Custom Python Linters: deprecation toolkit
- 20:24Reusable Workflows
- 21:06Automated Refactoring
- 22:01Our Custom Python Autofixes: FlakeB
- 23:51Our Custom non-Python Autofixes: notify-reviewer-teams
- 25:53Recap
related talks
21mTeach Your Old Code New Tricks: Automating Code Quality in Large Projects
28mPreventing headaches with linters and automated checks
31mHow GitHub uses linters
20mHidden Hacks in Linters for Better & More Secure Code
29mManaging the code quality of your project. Leave the past behind: Focus on new code.
30mAutomating Code Quality
05mTool Confusion: Pythonic Code with flake8, tox and pre-commit
22mPublishing well formed Python packages
