Autoformatting, type-checking, and linting #592
Replies: 7 comments 6 replies
-
You would need to substantiate the claims a bit that |
Beta Was this translation helpful? Give feedback.
-
I did check |
Beta Was this translation helpful? Give feedback.
-
With the default options, |
Beta Was this translation helpful? Give feedback.
-
+1 for integrating a typechecker into the 'hassle-free' python toolchain. don't particularly care if it's mypy or something else, as long as it works and is fast! |
Beta Was this translation helpful? Give feedback.
-
It sort of does matter if it's mypy or something else. Python's The same concern also applies with various linters and formatters that may struggle to keep up with newer Python syntax. |
Beta Was this translation helpful? Give feedback.
-
The problem with adding typing support today is that the choices of type checkers are not great. I think the best type checker available today for multiple reasons is If nothing better than |
Beta Was this translation helpful? Give feedback.
-
Maybe basedpyright is an another good choice for type checking? It can be installed via pip (it also requires node but the node binary will install via pip too) |
Beta Was this translation helpful? Give feedback.
-
In the Python world, auto-formatting, type-checking, and linting are three separate concerns. They are not one and the same.
Regarding auto-formatting, I tried
ruff
viarye lint
but it does not look to have sane defaults, making it useless as I see it. It did not detect or fix various simple issues. I findblack
more suitable.Regarding type-checking,
mypy
is critical to me, although the choice of tool may vary.Regarding any leftover linting,
pylint
is what I would compare any other Python linter with.My point is that
rye lint
should probably be removed unless all of the above can be tackled.Beta Was this translation helpful? Give feedback.
All reactions