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

Use ruff instead of flake8 for linting #485

Closed
rohanbabbar04 opened this issue Feb 8, 2023 · 4 comments
Closed

Use ruff instead of flake8 for linting #485

rohanbabbar04 opened this issue Feb 8, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@rohanbabbar04
Copy link
Contributor

Use ruff instead of flake8

  • It's faster than flake8
  • Linting is better with ruff
@mrava87
Copy link
Collaborator

mrava87 commented Feb 8, 2023

Hello,
I am not sure about changing something we used for long time and are satisfied with. @cako is currently away, once he is back at work he can give us his opinion as he introduced flake8 support to pylops.

@mrava87 mrava87 added the enhancement New feature or request label Feb 8, 2023
@cako
Copy link
Collaborator

cako commented Feb 18, 2023

I think ruff has a lot of potential, but I am hesitant port over to it right now for two reasons:

  1. Ruff does not support pattern matching. The fix for this should be coming soon.
  2. Ruff does not flag errors which are fixed by black. I understand we are using black as a pre-commit hook, but pre-commit hooks are not mandatory and can be bypassed. I would hate to be missing linting suggestions because someone at some point did not use black.

For those reasons I would rather wait until ruff becomes more mature before moving the whole project over to it. I am closing this issue as wontfix for now.

@cako cako closed this as completed Feb 18, 2023
@cako cako closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2023
@cako
Copy link
Collaborator

cako commented Nov 26, 2023

@mrava87 Ruff has made a lot of progress in this year. I've been using it almost exclusively for new projects. It's crazy fast! I think once they close these issues, we should think about migrating to it.

astral-sh/ruff#2402

astral-sh/ruff#5188

@mrava87
Copy link
Collaborator

mrava87 commented Nov 26, 2023

Sounds like a good plan! I haven't followed much but I trust you, just shout when you think is time :)

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

No branches or pull requests

3 participants