mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-16 11:02:22 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
ea6ff7907a
commit
122070cb8f
106
pyproject.toml
106
pyproject.toml
|
@ -62,84 +62,80 @@ docs = [
|
||||||
target-version = "py312"
|
target-version = "py312"
|
||||||
# Exclude the template content as most files aren't parseable
|
# Exclude the template content as most files aren't parseable
|
||||||
extend-exclude = [
|
extend-exclude = [
|
||||||
"{{cookiecutter.project_slug}}/*",
|
"{{cookiecutter.project_slug}}/*",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.ruff.lint]
|
# ==== pytest ====
|
||||||
select = [
|
lint.select = [
|
||||||
"F",
|
"A",
|
||||||
"E",
|
|
||||||
"W",
|
|
||||||
"C90",
|
|
||||||
"I",
|
|
||||||
"N",
|
|
||||||
"UP",
|
|
||||||
"YTT",
|
|
||||||
# "ANN", # flake8-annotations: we should support this in the future but 100+ errors atm
|
# "ANN", # flake8-annotations: we should support this in the future but 100+ errors atm
|
||||||
"ASYNC",
|
"ASYNC",
|
||||||
"S",
|
|
||||||
"BLE",
|
|
||||||
"FBT",
|
|
||||||
"B",
|
"B",
|
||||||
"A",
|
"BLE",
|
||||||
"COM",
|
|
||||||
"C4",
|
"C4",
|
||||||
|
"C90",
|
||||||
|
"COM",
|
||||||
"DTZ",
|
"DTZ",
|
||||||
"T10",
|
"E",
|
||||||
"EM",
|
"EM",
|
||||||
"EXE",
|
|
||||||
"FA",
|
|
||||||
'ISC',
|
|
||||||
"ICN",
|
|
||||||
"G",
|
|
||||||
'INP',
|
|
||||||
'PIE',
|
|
||||||
"T20",
|
|
||||||
'PYI',
|
|
||||||
'PT',
|
|
||||||
"Q",
|
|
||||||
"RSE",
|
|
||||||
"RET",
|
|
||||||
"SLF",
|
|
||||||
"SLOT",
|
|
||||||
"SIM",
|
|
||||||
"TID",
|
|
||||||
"TCH",
|
|
||||||
"INT",
|
|
||||||
# "ARG", # Unused function argument
|
|
||||||
"PTH",
|
|
||||||
"ERA",
|
"ERA",
|
||||||
"PD",
|
"EXE",
|
||||||
"PGH",
|
"F",
|
||||||
"PL",
|
"FA",
|
||||||
"TRY",
|
"FBT",
|
||||||
"FLY",
|
"FLY",
|
||||||
|
"G",
|
||||||
|
"I",
|
||||||
|
"ICN",
|
||||||
|
"INP",
|
||||||
|
"INT",
|
||||||
|
"ISC",
|
||||||
|
"N",
|
||||||
|
"PD",
|
||||||
# "NPY",
|
# "NPY",
|
||||||
# "AIR",
|
# "AIR",
|
||||||
"PERF",
|
"PERF",
|
||||||
|
"PGH",
|
||||||
|
"PIE",
|
||||||
|
"PL",
|
||||||
|
"PT",
|
||||||
|
# "ARG", # Unused function argument
|
||||||
|
"PTH",
|
||||||
|
"PYI",
|
||||||
|
"Q",
|
||||||
|
"RET",
|
||||||
|
"RSE",
|
||||||
# "FURB",
|
# "FURB",
|
||||||
# "LOG",
|
# "LOG",
|
||||||
"RUF",
|
"RUF",
|
||||||
|
"S",
|
||||||
|
"SIM",
|
||||||
|
"SLF",
|
||||||
|
"SLOT",
|
||||||
|
"T10",
|
||||||
|
"T20",
|
||||||
|
"TCH",
|
||||||
|
"TID",
|
||||||
|
"TRY",
|
||||||
|
"UP",
|
||||||
|
"W",
|
||||||
|
"YTT",
|
||||||
]
|
]
|
||||||
ignore = [
|
lint.ignore = [
|
||||||
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
|
|
||||||
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
|
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
|
||||||
|
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
|
||||||
"SIM102", # sometimes it's better to nest
|
"SIM102", # sometimes it's better to nest
|
||||||
"UP038", # Checks for uses of isinstance/issubclass that take a tuple
|
"UP038", # Checks for uses of isinstance/issubclass that take a tuple
|
||||||
# of types for comparison.
|
# of types for comparison.
|
||||||
# Deactivated because it can make the code slow:
|
# Deactivated because it can make the code slow:
|
||||||
# https://github.com/astral-sh/ruff/issues/7871
|
# https://github.com/astral-sh/ruff/issues/7871
|
||||||
]
|
]
|
||||||
# The fixes in extend-unsafe-fixes will require
|
# The fixes in extend-unsafe-fixes will require
|
||||||
# provide the `--unsafe-fixes` flag when fixing.
|
# provide the `--unsafe-fixes` flag when fixing.
|
||||||
extend-unsafe-fixes = [
|
lint.extend-unsafe-fixes = [
|
||||||
"UP038",
|
"UP038",
|
||||||
]
|
]
|
||||||
|
lint.isort.force-single-line = true
|
||||||
[tool.ruff.lint.isort]
|
|
||||||
force-single-line = true
|
|
||||||
|
|
||||||
# ==== pytest ====
|
|
||||||
|
|
||||||
[tool.pytest.ini_options]
|
[tool.pytest.ini_options]
|
||||||
addopts = "-v --tb=short"
|
addopts = "-v --tb=short"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user