-
Notifications
You must be signed in to change notification settings - Fork 84
Add ruff as the linter and formatter #527
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
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # easy_toolbox.py
…a: F401` to problems/views.py.
I added pyupgrade and flake8-comprehensions. From what I’ve checked so far, adding them didn’t cause any tests to fail, and they significantly refactored the code, which will make it easier to transition to a newer Python version. |
pre-commit install | ||
|
||
From now on, ruff will run automatically before each commit - just keep in mind | ||
that ruff will only run on the files you have modified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add suggestion that it is possible run on all files using: pre-commit run --all-files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
For long lines you could add |
I'm aware of that – |
Resolves: #199 and is a replacement for the abandoned PR: #213.
Ruff is configured to use the following rules:
I also removed the old linting/formatting tools along with their scripts.