Skip to content

Commit 2e2350e

Browse files
committed
chore: Update ruff lint configuration
1 parent 12bbac9 commit 2e2350e

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

cove_project/context_processors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django.conf import settings
22

33

4-
def from_settings(request):
4+
def from_settings(_request):
55
return {
66
"fathom": settings.FATHOM,
77
}

manage.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@
44

55
if __name__ == "__main__":
66
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cove_project.settings")
7-
try:
8-
from django.core.management import execute_from_command_line
9-
except ImportError as exc:
10-
raise ImportError(
11-
"Couldn't import Django. Are you sure it's installed and "
12-
"available on your PYTHONPATH environment variable? Did you "
13-
"forget to activate a virtual environment?"
14-
) from exc
7+
8+
from django.core.management import execute_from_command_line
9+
1510
execute_from_command_line(sys.argv)

pyproject.toml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,28 @@ line-length = 119
77
target-version = "py310"
88

99
[tool.ruff.lint]
10-
select = ["E", "C4", "F", "I", "W"]
10+
select = ["ALL"]
11+
ignore = [
12+
"ANN", "C901", "COM812", "D203", "D212", "D415", "EM", "PERF203", "PLR091", "Q000",
13+
"D1",
14+
"PTH",
15+
]
16+
17+
[tool.ruff.lint.flake8-builtins]
18+
builtins-ignorelist = ["copyright"]
19+
20+
[tool.ruff.lint.flake8-unused-arguments]
21+
ignore-variadic-names = true
22+
23+
[tool.ruff.lint.per-file-ignores]
24+
"docs/*" = ["D100", "INP001"]
25+
"{*/signals,*/views,*/migrations/*}.py" = ["ARG001"]
26+
"{*/admin,*/routers,*/views,*/commands/*}.py" = ["ARG002"]
27+
"{*/admin,*/forms,*/models,*/routers,*/serializers,*/translation,*/migrations/*,tests/*}.py" = ["RUF012"]
28+
"*/migrations/*" = ["E501"]
29+
"tests/*" = [
30+
"D", "FBT003", "INP001", "PLR2004", "PT", "S", "TRY003",
31+
]
1132

1233
[tool.pytest.ini_options]
1334
DJANGO_SETTINGS_MODULE = 'cove_project.settings'

0 commit comments

Comments
 (0)