-
-
Notifications
You must be signed in to change notification settings - Fork 868
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lint with ruff instead of flake8 and isort (#1295)
- Loading branch information
Showing
8 changed files
with
100 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,6 +69,6 @@ jobs: | |
- name: Quality tests | ||
env: | ||
TOXENV: flake8 | ||
TOXENV: ruff | ||
run: | | ||
tox |
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 |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# NOTE: You have to use single-quoted strings in TOML for regular expressions. | ||
# It's the equivalent of r-strings in Python. Multiline strings are treated as | ||
# verbose regular expressions by Black. Use [ ] to denote a significant space | ||
# character. | ||
|
||
# When switching from ruff.toml to pyproject.toml, use the section names that | ||
# start with [tool.ruff | ||
|
||
# [tool.ruff] | ||
select = [ | ||
"AIR", # Airflow | ||
"ASYNC", # flake8-async | ||
"B", # flake8-bugbear | ||
"C4", # flake8-comprehensions | ||
"C90", # McCabe cyclomatic complexity | ||
"CPY", # flake8-copyright | ||
"DJ", # flake8-django | ||
"E", # pycodestyle | ||
"EXE", # flake8-executable | ||
"F", # Pyflakes | ||
"FLY", # flynt | ||
"FURB", # refurb | ||
"G", # flake8-logging-format | ||
"I", # isort | ||
"ICN", # flake8-import-conventions | ||
"INP", # flake8-no-pep420 | ||
"INT", # flake8-gettext | ||
"ISC", # flake8-implicit-str-concat | ||
"NPY", # NumPy-specific rules | ||
"PD", # pandas-vet | ||
"PERF", # Perflint | ||
"PGH", # pygrep-hooks | ||
"PIE", # flake8-pie | ||
"PL", # Pylint | ||
"PYI", # flake8-pyi | ||
"RUF", # Ruff-specific rules | ||
"SLOT", # flake8-slots | ||
"T10", # flake8-debugger | ||
"T20", # flake8-print | ||
"TCH", # flake8-type-checking | ||
"TID", # flake8-tidy-imports | ||
"W", # pycodestyle | ||
"YTT", # flake8-2020 | ||
# "A", # flake8-builtins | ||
# "ANN", # flake8-annotations | ||
# "ARG", # flake8-unused-arguments | ||
# "BLE", # flake8-blind-except | ||
# "COM", # flake8-commas | ||
# "D", # pydocstyle | ||
# "DTZ", # flake8-datetimez | ||
# "EM", # flake8-errmsg | ||
# "ERA", # eradicate | ||
# "FA", # flake8-future-annotations | ||
# "FBT", # flake8-boolean-trap | ||
# "FIX", # flake8-fixme | ||
# "N", # pep8-naming | ||
# "PT", # flake8-pytest-style | ||
# "PTH", # flake8-use-pathlib | ||
# "Q", # flake8-quotes | ||
# "RET", # flake8-return | ||
# "RSE", # flake8-raise | ||
# "S", # flake8-bandit | ||
# "SIM", # flake8-simplify | ||
# "SLF", # flake8-self | ||
# "TD", # flake8-todos | ||
# "TRY", # tryceratops | ||
# "UP", # pyupgrade | ||
] | ||
ignore = [ | ||
"B028", | ||
"B904", | ||
"PGH004", | ||
] | ||
line-length = 119 | ||
target-version = "py37" | ||
|
||
[isort] | ||
# [tool.ruff.isort] | ||
force-single-line = true | ||
known-first-party = ["storages"] | ||
|
||
[per-file-ignores] | ||
# [tool.ruff.per-file-ignores] | ||
"docs/conf.py" = ["E402", "INP001"] | ||
"storages/backends/ftp.py" = ["PERF203"] | ||
"tests/test_s3.py" = ["B018"] | ||
|
||
[pylint] | ||
# [tool.ruff.pylint] | ||
allow-magic-value-types = ["int", "str"] |
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
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