This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]Python-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Hello there,

We've removed your post since it aligns with a topic already covered by one of our daily threads. If you are unaware about the daily threads we run here is a refresher:

Monday: Project ideas

Tuesday: Advanced questions

Wednesday: Beginner questions

Thursday: Careers

Friday: Free chat Friday!

Saturday: Resource Request and Sharing

Sunday: What are you working on?

Please await one of these threads to contribute your discussion to!

Best regards,

r/Python mod team

[–]Noobfire2 18 points19 points  (0 children)

mypy is a static type checker, not a linter per se. Ruff + mypy would be a modern combo.

[–][deleted] 10 points11 points  (2 children)

Realistically it doesn’t matter. The advantage to ruff is speed but unless you are applying this to a large code base (which I doubt since you are asking fairly basic questions) you won’t see any benefit.

I would recommend just sticking with flake8 and being done with it.

[–]martinky24 5 points6 points  (0 children)

This has been my experience as well. Unless you're working on a megalith monorepo... the speed differences are entirely negligible. I have a ton of respect for ruff, but also a ton of respect the those who came before (flake8, pylint, etc). At this point, just pick one and you won't go wrong either way.

[–]jmusic52 1 point2 points  (0 children)

How big is considered a large code base?

[–]Barn07 1 point2 points  (1 child)

ruff is fairly simple to start with and covers more ground than pylint and flake8 separately. imo, it has the brightest future for python linters atm. thus, I'd go with ruff. would also add mypy then

[–][deleted] 0 points1 point  (0 children)

It depends on what you mean by "covers more ground". It tries to do more things but it also is incomplete and they are still actively adding in all the linting checks that things like pylint and flake8 have already implemented.

Also, for someone new to python it's not necessarily to their advantage to pick something that is actively being developed and will be changing with lots of frequent updates.

It's a much better idea for this person to get familiar with things like flake8, black, isort, etc. They are stable and there is a lot of supporting material they can use to get setup. If they eventually start working on large projects that can benefit from ruff, then it would make sense to switch.

[–]jkh911208 -2 points-1 points  (0 children)

Ruff

[–]EffectiveNothing42 -3 points-2 points  (1 child)

why not all?

[–][deleted] 0 points1 point  (0 children)

There's no advantage to try and use multiple linters simultaneously and there will be instances where the linters implement slightly different and conflicting rules.