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

Potential new feature: ruff linting #109

Open
nilsleh opened this issue Apr 22, 2024 · 1 comment · May be fixed by #110
Open

Potential new feature: ruff linting #109

nilsleh opened this issue Apr 22, 2024 · 1 comment · May be fixed by #110
Labels
maintenance Tasks relating to codebase maintenance, not functionality

Comments

@nilsleh
Copy link

nilsleh commented Apr 22, 2024

Summary

At the moment only black is used as a linter, and I think it could be reasonable to introduce ruff as a linter, since it includes all the "good practice" codebase linters in one and easy to add for github CI, and pre-commit hook since it encompasses everything in one command.

@davidwilby just because we were talking about this

Basic Example

One can run it manually to check errors or have it format code automatically, like black does already.

Drawbacks

Running ruff on the code base now would make a lot of changes to a lot of files.

Unresolved questions

No response

Implementation PR

I would be happy to do a PR on that.

Reference Issues

No response

@nilsleh nilsleh added the enhancement New feature or request label Apr 22, 2024
@davidwilby davidwilby linked a pull request Apr 26, 2024 that will close this issue
@davidwilby davidwilby added maintenance Tasks relating to codebase maintenance, not functionality and removed enhancement New feature or request labels Apr 26, 2024
@tom-andersson
Copy link
Collaborator

Thanks @nilsleh. I'm not super opinionated. The main github page only mentions catching and removing unused imports - what other errors can it catch? Generally I'd be a bit hesitant about changing the default linter quite far through a project (and the risk of forgetting to update docs etc).

If you are keen and think the added value is worthwhile, you could just try running ruff and submitting a PR, and we just see what the diff looks like. All the changes would be encapsulated in that PR, so it's not really an issue that many files would be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Tasks relating to codebase maintenance, not functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants