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

Try out ruff? #686

Closed
hoechenberger opened this issue Dec 13, 2022 · 6 comments
Closed

Try out ruff? #686

hoechenberger opened this issue Dec 13, 2022 · 6 comments

Comments

@hoechenberger
Copy link
Member

As a replacement for flake8:

https://pypi.org/project/ruff/

WDYT @larsoner?

@drammock
Copy link
Member

that looks very promising; would be awesome to have a linter fast enough to be used as a commit hook. Off the top of my head though I think it at least lacks flake8-array-spacing functionality (which MNE-Python uses, not sure if the pipeline does). Might still be possible to adopt it though.

@larsoner
Copy link
Member

IIRC the array spacing one is barely used, and will definitely go away if we adopt black like we plan to do at some point (at least I think we converged on this). It might be worth getting rid of it and just reformatting or noqa'ing where it made a difference

@agramfort
Copy link
Member

agramfort commented Dec 13, 2022 via email

@larsoner
Copy link
Member

Done in #688

@hoechenberger
Copy link
Member Author

if I can have a faster linter output on save in vscode that is much
appreciated :)

Message ID: @.***>

I believe they are actually working on an extension for VS Code so you wouldn't even have to install ruff into your Python environment anymore. I can keep you posted on this.

@hoechenberger
Copy link
Member Author

if I can have a faster linter output on save in vscode that is much
appreciated :)

Message ID: @.***>

I believe they are actually working on an extension for VS Code so you wouldn't even have to install ruff into your Python environment anymore. I can keep you posted on this.

Oh it's already available, see: https://devblogs.microsoft.com/python/python-in-visual-studio-code-december-2022-release/#community-highlight-ruff

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