Faster Python linting

44 views
Skip to first unread message

Bruce Dawson

unread,
Aug 31, 2022, 1:02:32 PM8/31/22
to python
Python linting during presubmits can be slow enough to be noticeable. We parallelize it when there is enough work to do, but the per-process startup time is high enough that this is no panacea. In addition, PyLint is quirky in that it sometimes gives different sets of warnings depending on whether it is run in serial or parallel mode.

I just saw this tweet announcing a new rust-based Python linter that is roughly 60x as fast as PyLint:

https://twitter.com/charliermarsh/status/1564674602537816064

I wonder if this is worth exploring.

--
Bruce Dawson, he/him

Mike Frysinger

unread,
Aug 31, 2022, 5:01:08 PM8/31/22
to Bruce Dawson, python
speed is great, but obviously if it lacks features, it's not terribly useful in the end.  i'll note their site says:
> ruff is a proof-of-concept and not yet intended for production use. It supports only a small subset of the Flake8 rules, and may crash on your codebase.

with more details at:

sounds like it's ripe for some 20%ers, and then we check back in a ~year :).
-mike

--
You received this message because you are subscribed to the Google Groups "python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python+un...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/python/CAE5mQiNJ38d8T9teUb4y9-gWJONLNXNVPayhWQj86dZ3UPmwnw%40mail.gmail.com.

Bruce Dawson

unread,
Aug 31, 2022, 5:07:57 PM8/31/22
to Mike Frysinger, python
Ah - good catch. I agree with your analysis.
--
Bruce Dawson, he/him

Reply all
Reply to author
Forward
0 new messages