-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
Flake8 to ruff #2630
Flake8 to ruff #2630
Conversation
At the moment, |
PyBaMM does not like
(will run automatically whenever a commit is created locally) However, if someone wants to only run
|
Codecov ReportBase: 99.69% // Head: 99.69% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## develop #2630 +/- ##
===========================================
- Coverage 99.69% 99.69% -0.01%
===========================================
Files 271 271
Lines 19571 19570 -1
===========================================
- Hits 19511 19510 -1
Misses 60 60
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Thanks @Saransh-cpp , that was fast! I think this way with .pre-commit-config.yaml
is a good compromise. Approval from me but will wait a bit to see if @priyanshuone6 has any suggestions
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.
Looks good! It's nice that it has an 88 character limit by default, and we don’t need to specify every time.
Description
Tried
ruff
locally, and it really is super fast!I also tried migrating some of the metadata to
pyproject.toml
, but I ended up with a lot of errors (given thatpyproject.toml
support is still very new and maybe in the beta phase insetuptools
.)Some false alarm examples that are being ignored using
pyproject.toml
-Fixes #2623
Type of change
Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.
Key checklist:
$ flake8
$ python run-tests.py --unit
$ cd docs
and then$ make clean; make html
You can run all three at once, using
$ python run-tests.py --quick
.Further checks: