Skip to content
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

Open
marcus-oscarsson opened this issue Sep 27, 2024 · 1 comment
Open

Linting, formating and typechecking tools #1423

marcus-oscarsson opened this issue Sep 27, 2024 · 1 comment

Comments

@marcus-oscarsson
Copy link
Member

We are using Flake8 and Pylint and Black for linting and formatting. Many projects including flask have switched to ruff and are also using pyright (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 and Flake8 (I'm not sure about Pylint) 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 :),

@fabcor-maxiv
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants