-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linting, formating and typechecking tools #1423
Comments
I agree with migrating to ruff for linting (or ruff+black). I agree with adding type checks to our toolchain. I have never used pyright, I have used mypy quite a lot. Whatever the tool for type checks, I feel like there might be a lot of things to fix for the checks to pass. But for the record: I am still a bit wary of ruff, because the tool is very new compared to the tools it is meant to replace that have matured for many years. I can't deny that ruff got very popular very quickly so that must be for a reason. And of course, if it simplifes our toolchain, then it is a good thing. |
Migration to Ruff for linting and formatting: #1555. My impression is that we still might need additional tools besides Ruff for linting. As far as I can tell Ruff only does static analysis (it does not actually import or run any code). On the other hand some tools like Pylint are much more thorough and are able to do a deeper analysis of the code (partly because it does import the code). But we are not there yet, for now Ruff covers at least as much as we had before migrating to Ruff. |
Ruff team is also working on a checker for type hints. There is no timeline for when it will be ready. |
We are using
Flake8
andPylint
andBlack
for linting and formatting. Many projects includingflask
have switched toruff
and are also usingpyright
(for static type checking).We currently don't have any tool for static type checking and I think that could be worth adding.
Ruff is supposed to be a drop in replacement for
Black
andFlake8
(I'm not sure aboutPylint
) but apparently much faster. I'm not sure its worth switching to Ruff, perhaps any of you have some experience with it and can give us your opinion.@oldfielj-ansto recently added both tools to the
mxcube-video-streamer
project which was very welcome :),The text was updated successfully, but these errors were encountered: