-
Notifications
You must be signed in to change notification settings - Fork 14
/
pyproject.toml
42 lines (40 loc) · 1.6 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[tool.pytest.ini_options]
norecursedirs = "ve ve3 static media .git node_modules"
DJANGO_SETTINGS_MODULE="www.test_settings"
addopts = "--reuse-db"
markers = """
slow: marks tests as slow (deselect with '-m "not slow"')
network: marks tests using the network (deselect with '-m "not network"')
unoconv: uses unoconv (underterministic)
webtest: http queries against localhost
celery: uses celery tasks
postgresql: needs a postgresql database to run
"""
[tool.ruff.lint]
select = [
"F", "E", "W", "YTT", "B", "COM818",
"C4", "DTZ", "T10", "EXE", "ISC",
"ICN", "G", "PIE", "PYI", "PT",
"SIM", "TID", "PL", "RSE", "RUF"
]
# Not now: "N", "ANN", "S", "BLE", "A", "DJ", "EM",
# "INP", "TCH", "ERA", "PGH", "SLF",
# Partial some day ? "RET", "PTH", "TRY"
# Never ? "FBT", "D", "COM", "T20", "Q", "ARG", "PD"
ignore = [
"E501", # Line too long
"B905", # Not available <3.10
"PT011", # `pytest.raises(Exception)` is too broad
"SIM108", # Use ternary operator
"SIM105", # Use `contextlib.suppress(Alarm)`
"PLR2004", # Magic value used in comparison
"PLR0913", # Too many arguments to function call
"PLR0911", # Too many return statements
"PLC1901", # if x != "" is not the same as if x
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"SIM103", # Return the condition directly
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # imported but unused
"www/settings.py" = ["F403"] # import *` used; unable to detect undefined names
"www/test_settings.py" = ["F403"] # import *` used; unable to detect undefined names