forked from mozilla/addons-server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
72 lines (68 loc) · 1.85 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[tool.ruff]
exclude = [
"docs",
"static",
".git",
"*/migrations/*.py",
]
ignore = [
"B904", # Within an `except` clause, raise exceptions with `raise ... from err|None`
]
line-length = 88
select = [
"B", # flake8-bugbear
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"Q", # flake8-quotes
"W", # pycodestyle warnings
]
[tool.ruff.flake8-quotes]
inline-quotes = "single"
[tool.ruff.format]
quote-style = "single"
line-ending = "lf"
[tool.ruff.isort]
combine-as-imports = true
lines-after-imports = 2
section-order = ["future", "standard-library", "django", "third-party", "first-party", "local-folder"]
[tool.ruff.isort.sections]
"django" = ["django"]
[tool.pytest.ini_options]
addopts = "-vs --reuse-db --showlocals --tb=short"
python_files = "test*.py"
norecursedirs = [
"node_modules",
"locale",
"static",
"media",
"site-static",
"user-media",
"tmp",
"templates",
"fixtures",
"migrations",
".*",
"*.egg",
"dist",
"cache",
"venv",
"__pycache__",
]
DJANGO_SETTINGS_MODULE = "settings_test"
# Ignoring csp deprecation warnings, we have control over the module and
# currently it warns for child-src which is deprecated in CSPv3 but we're still
# on CSP 2 while CSP 3 is still in working draft (sept 2018)
filterwarnings = [
"default",
"ignore:::csp.utils",
# Ignore ResourceWarning for now. It's a Python 3 thing :-/
"ignore::ResourceWarning",
]
markers = [
"es_tests: mark a test as an elasticsearch test.",
"needs_locales_compilation: mark a test as needing compiled locales to work.",
"allow_external_http_requests: mark a test to allow external http requests and disable responses.",
"static_assets: Tests that are depending on `compress_assets` and require to be separated with other tests.",
"internal_routes_allowed: mark a test as needing INTERNAL_ROUTES_ALLOWED=True.",
]