forked from rucio/rucio
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing: Add isort-only Ruff to pre-commit and autotest; rucio#6538
Adding Ruff to both the pre-commit script (with --fix passed, thus sorting imports automatically) and to GH autotest (checking only). Ruff is currently only configured to check for import sorting. Other linting functions (flake8, pyupgrade) will be added progressively.
- Loading branch information
Showing
3 changed files
with
65 additions
and
0 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
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,3 +1,49 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.ruff] | ||
line-length = 256 | ||
|
||
# Exclude a variety of commonly ignored directories. | ||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".git-rewrite", | ||
".hg", | ||
".ipynb_checkpoints", | ||
".mypy_cache", | ||
".nox", | ||
".pants.d", | ||
".pyenv", | ||
".pytest_cache", | ||
".pytype", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
".vscode", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"site-packages", | ||
"venv", | ||
] | ||
|
||
[tool.ruff.lint] | ||
select = [ | ||
"I", # isort | ||
] | ||
|
||
ignore = [ | ||
"ALL", | ||
"UP031", # Use format specifiers instead of percent format | ||
"SIM210", | ||
] | ||
|
||
extend-safe-fixes = ["I001"] |