Skip to content

Commit

Permalink
Fix ruff warnings (#1382)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschneier committed Apr 21, 2024
1 parent 8b8cdb2 commit 1048d8b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions pyproject.toml
Expand Up @@ -81,19 +81,17 @@ readme = {file = ["README.rst", "CHANGELOG.rst"]}
version = {attr = "storages.__version__"}

[tool.ruff]
select = [
lint.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
Expand Down Expand Up @@ -140,21 +138,21 @@ select = [
# "TRY", # tryceratops
# "UP", # pyupgrade
]
ignore = [
lint.ignore = [
"B028",
"B904",
"PGH004",
]
target-version = "py37"

[tool.ruff.isort]
[tool.ruff.lint.isort]
force-single-line = true
known-first-party = ["storages"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = ["E402", "INP001"]
"storages/backends/ftp.py" = ["PERF203"]
"tests/test_s3.py" = ["B018"]

[tool.ruff.pylint]
[tool.ruff.lint.pylint]
allow-magic-value-types = ["int", "str"]
2 changes: 1 addition & 1 deletion tox.ini
Expand Up @@ -41,7 +41,7 @@ deps =
black
ruff
commands =
ruff .
ruff check .
black --check .
skip_install = true

Expand Down

0 comments on commit 1048d8b

Please sign in to comment.