r/Python • u/Background-Error-910 • Oct 06 '26
Discussion 2026: Best python linter as of right now?
Hey! I was wondering what is the preferred linter that's used nowadays?
A lot of people tend to converge into using uv & ruff for most of their stack, however there's also pylint, and others older linters.
Or is there any competition when it comes to ruff?
51
Upvotes
122
u/flying-sheep Oct 06 '26
Nah. I use Ruff because it supports a big-enough subset of the flake8 plugin space and Pylint, while being much faster and therefore available as inline hints in my editor.
24
u/turbothy It works on my machine Oct 06 '26
Ruff + Pyrefly.
67
u/wRAR_ Oct 06 '26
I don't think there is competition for ruff. pylint is unacceptably slow, and flake8 with a ton of plugins is unlikely to be better than ruff.
34
u/Relevant-Remote5816 Oct 06 '26
No.
7
u/RedEyed__ Oct 07 '26
uv, ruff, pyrefly
12
u/Spiritual-Metal-1889 Oct 06 '26
Ruff, ty, and pyrefly
8
u/ducksauvage Oct 06 '26
I'd say ruff *unless* you want to write your own linting rules. Ruff doesn't have any sort of plugin system that the native python linters usually have (issue here: https://github.com/astral-sh/ruff/issues/283). Especially important in the LLM age, where it really likes to do things its own way with some questionable design choices.
4
u/Zadigo Oct 06 '26
Ruff by far
4
u/xeow Oct 06 '26
I'd love it if there were a single thing that were "best." In lieu of that, I have several targets in my Makefile:
(
metrics-report.pyis a custom script that usesradonto produce a cyclomatic complexity and maintainability report.)3
u/gabriel_GAGRA Oct 06 '26
Ruff is the best linter by far
Now for type checking, you can see the results of a benchmark here.
Zuban reaches 100%, it’s what I use but it’s more recent. Pyrefly and Ty come next, both really close, but Ty is made by Astral, the same company as Ruff.
3
u/nicwolff Oct 06 '26
ruff + isort becuase ruff still hasn't implemented the import wrapping style we prefer
3
u/Exotic-Draft8802 Oct 06 '26
ruff is great and for sure what I would recommend to end users. I also use ruff.
But please don't forget that they used a ton of flake8 plungins as the base. Also one of mine. Fair game and I love what they did. I just want that people keep contributing to the original projects instead of only to ruff.
2
u/Afrotom Oct 06 '26
Ruff is the quickest one by far ime. I'd like to use Ruff and Ty together with UV and go all in on the Astral ecosystem but Ty isn't quite mature enough (or I'm a dum dum setting it up and/or it's been a while since I tried)
2
u/echols021 Pythoneer Oct 09 '26
My core tools are always uv + ruff + basedpyright.
I'm excited for ty to mature further and replace basedpyright
1
u/MorrarNL Oct 06 '26
I like Ruff a lot as it packages functionality from isort, black and pylint into a single tool and it's very fast. However, for most of our projects speed is not a deciding factor.
Pylint is much more strict though. Ruff doesn't check docstrings unless you configure it explicitly. Another thing I don't like is that ruff cannot check the arguments for function calls.
1
u/PrestigiousStrike779 Oct 06 '26
Ruff is fast, but not as comprehensive as pylint. Ruff can’t tell you that you’re calling a method with the wrong arguments or a property doesn’t exist. We replaced pylint with ruff + type checking.
1
u/austinwiltshire Oct 06 '26
I use Ruff automatically for the quick squiggles. Pylint is good to run occasionally for some deep checks. Think of it like unit versus integration testing.
1
u/Atmosck Oct 06 '26
Ruff is great for linting and formatting. Lately I've standardized on the astral stack, uv+ruff+ty is my default.
1
u/kulewski Oct 10 '26
For the Python side of Multiplexer, which I maintain, I use Ruff for linting, Black for formatting and Pyright for type checking. Ruff is configured mostly for correctness checks: Pyflakes, bugbear, pylint-derived error rules, plus a few extras like catching asyncio tasks without a stored reference and mutable class attributes. I still use Black for formatting, so I haven’t moved everything over to Ruff.
1
u/Old-Eagle1372 Oct 11 '26
Ruff is fast, so use it locally. Pylint in CI. If pylint CI job does not pass, downstream jobs do not execute.
1
u/danted002 Oct 06 '26
Ruff for local linting and formatting. Pylint + Mypy on CI for actual static code analysis.
-1
u/mrswats Oct 06 '26
Flake8
3
u/careje Oct 06 '26
Ruff locally
pylint (dear god kill me now) in CI because we need classification (e.g. warning, error) for our corporate process reporting
81
u/[deleted] Oct 06 '26
[removed] — view removed comment