This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
87 lines (74 loc) · 2.18 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
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "booklogger.settings"
addopts = "--nomigrations --cov=booklogger --cov=library --cov-report term-missing:skip-covered --cov-fail-under=77 --no-cov-on-fail -n auto"
norecursedirs = "library/jinja2/library"
[tool.coverage.report]
omit = [
"*/settings.py",
"*/urls.py",
"booklogger/?sgi.py",
"library/migrations/*",
"library/tests/*",
]
[tool.mypy]
files = ["booklogger", "library"]
exclude = "/(migrations|tests|jinja2)/$"
pretty = true
show_error_codes = true
check_untyped_defs = true
disallow_any_generics = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
ignore_missing_imports = true
no_implicit_optional = true
no_implicit_reexport = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
plugins = ["mypy_django_plugin.main"]
# disabled at least until typeddjango/django-stubs#700 is fixed
cache_dir = "/dev/null"
no_incremental = true
[tool.django-stubs]
django_settings_module = "booklogger.settings"
[tool.djlint]
blank_line_after_tag = "endblock"
blank_line_before_tag = "block"
close_void_tags = false
ignore = "H006,H013,H023,H030,H031,J018"
indent = 2
profile = "jinja"
[tool.djlint.css]
indent_size = 2
[tool.djlint.js]
indent_size = 2
[tool.isort]
profile = "black"
[tool.ruff]
target-version = "py310"
extend-exclude = ["library/migrations/*", "manage.py"]
select = ["ALL"]
ignore = [
"E501",
"D",
"ANN101", # type annotations on self seem useless
"ANN401", # allow Any in kwargs
"COM812", # seems to conflict with black
"PLR2004", # TODO Magic value used in comparison
"RUF001", # TODO String contains ambiguous unicode character
"TCH", # TODO Move import into a type-checking block
# "RUF012", # TODO Mutable class attributes should be annotated with `typing.ClassVar`
]
[tool.ruff.per-file-ignores]
"library/management/commands/*" = [
'INP001', # not a real namespace
]
"library/tests/*" = [
"ANN", # ignore annotations in tests: plays badly with pytest fixtures
"S101", # assert is needed in tests
"INP001", # not a real namespace
]