-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
93 lines (82 loc) · 2.2 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
[tool.ruff]
# Exclude upstream assets files from jobserver
exclude = [
"assets/templates/*",
"assets/base_views.py"
]
[tool.ruff.lint]
# See: https://docs.astral.sh/ruff/rules/
extend-select = [
"A", # prevent shadowing builtins
"COM818", # no trailing commas on bare tuples
"I", # isort
"INP", # no implicit namespace packages
"UP", # pyupgrade
"W", # pycodestyle warning
]
extend-ignore = [
"A005", # ignore stdlib-module-shadowing
"E501", # ignore line length
]
isort.lines-after-imports = 2
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "airlock.settings"
testpaths = [
"tests"
]
filterwarnings = [
"ignore::DeprecationWarning:opentelemetry.*:",
"ignore::DeprecationWarning:pytest_freezegun.*:",
]
[tool.coverage.run]
branch = true
# Required to get full coverage when using Playwright
concurrency = ["greenlet", "thread"]
plugins = ["django_coverage_plugin"]
omit = [
"*/assets/*",
"airlock/lib/git.py",
"tests/functional/test_docs_screenshots.py",
]
[tool.coverage.report]
fail_under = 100
skip_covered = true
exclude_also = [
# this indicates that the line should never be hit
"assert False",
# this condition is only true when a module is run as a script
'if __name__ == "__main__":',
# this indicates that a method should be defined in a subclass
"raise NotImplementedError",
]
[tool.coverage.django_coverage_plugin]
template_extensions = "html"
exclude_blocks = [
# exclude block lines for end of slippers component (blocks that
# start with \ e.g. {% \button %}
"^\\/\\w+",
]
[tool.ruff.lint.per-file-ignores]
"airlock/views/__init__.py" = ["F401"]
[tool.mypy]
plugins = ["mypy_django_plugin.main"]
disallow_any_generics = true
no_implicit_reexport = true
warn_return_any = true
check_untyped_defs = true
mypy_path = "stubs"
exclude = [
"airlock/lib/git.py",
]
# Don't follow the import chain into the modules containing code vendored from elsewhere
[[tool.mypy.overrides]]
module = "assets.base_views"
follow_imports = "skip"
[[tool.mypy.overrides]]
module = "services.tracing"
follow_imports = "skip"
[[tool.mypy.overrides]]
module = "airlock.lib.git"
follow_imports = "skip"
[tool.django-stubs]
django_settings_module = "airlock.settings"