-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ruff: create config file and run auto format & fixes
- Loading branch information
Showing
43 changed files
with
672 additions
and
261 deletions.
There are no files selected for viewing
This file contains 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 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 |
---|---|---|
@@ -1,11 +1,7 @@ | ||
repos: | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.11.5 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.6.9 | ||
hooks: | ||
- id: black | ||
#- id: ruff | ||
- id: ruff-format |
This file contains 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 |
---|---|---|
@@ -1,5 +1,55 @@ | ||
[tool.black] | ||
[tool.ruff] | ||
line-length = 120 | ||
[tool.isort] | ||
profile = "black" | ||
line_length = 120 | ||
show-fixes = true | ||
target-version = "py39" # TODO verify min Python version | ||
|
||
lint.select = [ | ||
"ALL", # include all the rules, including new ones | ||
] | ||
exclude = [ | ||
"tests/utest/testdata/" | ||
] | ||
lint.ignore = [ | ||
#### modules | ||
"ANN", # flake8-annotations | ||
"COM", # flake8-commas | ||
"C90", # mccabe complexity | ||
"DJ", # django | ||
"EXE", # flake8-executable | ||
"PTH", # flake8-use-pathlib | ||
"T10", # debugger | ||
"TID", # flake8-tidy-imports | ||
#### specific rules | ||
"D100", # ignore missing docs | ||
"D101", | ||
"D102", | ||
"D103", | ||
"D104", | ||
"D105", | ||
"D106", | ||
"D107", | ||
"D200", | ||
"D203", # blank line before class body | ||
"D205", | ||
"D212", | ||
"D400", | ||
"D401", | ||
"D415", | ||
"E402", # false positives for local imports | ||
"E722", # bare except | ||
"B904", # Raise from None | ||
"EM101", # No string-literal exceptions !? | ||
"EM102", # No Exceptions with f-strings | ||
"PLR0913", # too many arguments to function call | ||
"TRY003", # external messages in exceptions are too verbose | ||
"TD002", | ||
"TD003", | ||
"FIX002", # too verbose descriptions of todos | ||
"PLE1205", # too many arguments for logging | ||
"T201", # print in code | ||
] | ||
|
||
[tool.ruff.format] | ||
quote-style = "double" | ||
skip-magic-trailing-comma = false | ||
line-ending = "auto" |
This file contains 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 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 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 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
Oops, something went wrong.