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

Replace more lint tooling with ruff #1805

Open
1 task done
Zeitsperre opened this issue Jun 26, 2024 · 0 comments
Open
1 task done

Replace more lint tooling with ruff #1805

Zeitsperre opened this issue Jun 26, 2024 · 0 comments
Assignees

Comments

@Zeitsperre
Copy link
Collaborator

Zeitsperre commented Jun 26, 2024

Generic Issue

  • xclim version: 0.50.1-dev
  • Python version: Any
  • Operating System: All

Description

The number and diversity of checks and automatic fixes for common problems available via ruff is ever-expanding. It is also several orders of magnitude faster than running isort, black, flake8, etc.

Currently, we could replace the following checks:

  • pyupgraderuff.format
  • nbqa-pyupgradenbqa-ruff
  • isortruff.lint.isort
  • nbqa-isortnbqa-ruff
  • blackruff.format.*
  • nbqa-blacknbqa-ruff
  • blackdocruff.format.docstring-code-format = true

flake8 is only used for flake8-rst-docstrings as the entirety of that functionality has not (yet) been reproduced in ruff. Once that changes, we could remove the .flake8 file and all of flake8 as well.

Reasons we should keep things as is?

There are small deviations from the "real" black and isort checkers, as they are under constant development and their standards tend to change from time to time.

Anthony Sottile (pre-commit, PyCQA) has some thoughts: https://www.youtube.com/watch?v=XzW4-KEB664

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Zeitsperre Zeitsperre self-assigned this Jun 26, 2024
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

1 participant