Ruff is a new-ish linter program that does the job of pylint or flake8 but is 100 times or more faster because it is written in Rust. It might be worth looking at for Leo.
Here's one of the testimonials:
Nick Schrock, founder of Elementl, co-creator of GraphQL:
Why is Ruff a gamechanger? Primarily because it is nearly 1000x faster. Literally. Not a typo. On our largest module (dagster itself, 250k LOC) pylint takes about 2.5 minutes, parallelized across 4 cores on my M1. Running ruff against our entire codebase takes .4 seconds.
It's pypi-installable so presumably usable without executing an external program.