-
Notifications
You must be signed in to change notification settings - Fork 8
chore: use ruff with ruff.toml file #594
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
016a4b7
feat: Introducing Ruff config, removing .flake8, updating pre-commit-…
ecoussoux-ansys 2f984e9
feat: Adding ruff-format hook to pre-commit, updating fixed files
ecoussoux-ansys 9048472
feat: Adding linting rules to Ruff config, updating fixed file
ecoussoux-ansys d40cb5f
feat: Extending Ruff linting rules list, updating fixed files
ecoussoux-ansys 4d3ee77
feat: Reverting change breaking doc build, updating ignored linting r…
ecoussoux-ansys f201f0d
Apply suggestions from code review
ecoussoux-ansys 7c944dc
feat: Updating pyansys_logging and ruff config based on review comments
ecoussoux-ansys eb21abd
Merge branch 'main' into feat/setup-ruff
ecoussoux-ansys 7dc1f5f
Update doc/source/how-to/code/test_pyansys_logging.py
ecoussoux-ansys 349077a
feat: Removing ignored rules from ruff config and updating files acco…
ecoussoux-ansys a618b08
Merge branch 'main' into feat/setup-ruff
ecoussoux-ansys b159c49
Update doc/source/how-to/code/test_pyansys_logging.py
SMoraisAnsys File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ def func(arg1, arg2): | |
|
||
Examples | ||
-------- | ||
>>> func(1, 'foo') | ||
>>> func(1, "foo") | ||
True | ||
|
||
""" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
exclude = [ | ||
"build", | ||
"doc/source/conf.py", | ||
] | ||
|
||
line-length = 100 | ||
|
||
[format] | ||
quote-style = "double" | ||
indent-style = "space" | ||
docstring-code-format = true | ||
|
||
[lint] | ||
select = [ | ||
"D", # pydocstyle, see https://docs.astral.sh/ruff/rules/#pydocstyle-d | ||
"E", # pycodestyle, see https://docs.astral.sh/ruff/rules/#pycodestyle-e-w | ||
"F", # pyflakes, see https://docs.astral.sh/ruff/rules/#pyflakes-f | ||
"I", # isort, see https://docs.astral.sh/ruff/rules/#isort-i | ||
"N", # pep8-naming, see https://docs.astral.sh/ruff/rules/#pep8-naming-n | ||
"PTH", # flake8-use-pathlib, https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth | ||
"TD", # flake8-todos, https://docs.astral.sh/ruff/rules/#flake8-todos-td | ||
"W", # pycodestyle, see https://docs.astral.sh/ruff/rules/#pycodestyle-e-w | ||
] | ||
ignore = [ | ||
"D100", # Missing docstring in public module | ||
"D101", # Missing docstring in public class | ||
"D102", # Missing docstring in public method | ||
"D105", # Missing docstring in magic method | ||
"D400", # First line should end with a period | ||
"TD002", # Missing author in TODOs comment | ||
"TD003", # Missing issue link in TODOs comment | ||
] | ||
SMoraisAnsys marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[lint.pydocstyle] | ||
convention = "numpy" | ||
|
||
[lint.isort] | ||
combine-as-imports = true | ||
force-sort-within-sections = true | ||
|
||
[lint.mccabe] | ||
max-complexity = 10 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.