-
Notifications
You must be signed in to change notification settings - Fork 25
feat: migrate to Ruff for code linting and formatting #1727
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
Conversation
src/ansys/dpf/gatebin/| | ||
src/ansys/grpc/dpf/| | ||
) | ||
exclude: > |
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.
Without fixing this, pre-commit was ignoring all files.
b7a1720
to
e6603df
Compare
e6603df
to
46a88ee
Compare
As discussed in private, we will enable step by step the different rules for better fixing any issues. Despite the rules being deactivated, Ruff formatter still provides all current capabilities. Just see the rules as "extras" or "plugins". |
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
args: ["--ignore-words=ignore_words.txt"] | ||
args: ["--ignore-words=./doc/styles/Vocab/ANSYS/accept.txt"] |
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.
Unifying all ignore/accepted words in the "accept.txt" file
doc/styles/Vocab/ANSYS/accept.txt
Outdated
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.
I just sorted and uniq this file
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1727 +/- ##
==========================================
+ Coverage 85.67% 87.05% +1.37%
==========================================
Files 83 83
Lines 9937 9937
==========================================
+ Hits 8514 8651 +137
+ Misses 1423 1286 -137 |
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.
Checked the main changes, scanned the rest quickly, LGTM
This pull-request drops support for black, isort, and flake in favor of Ruff, which contains all previous tools and more!
This linter and formatter is really fast for big projects. Its rules are able to identify common issues and format files in just a few milliseconds.
This pull-request is related with #1722.