-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
94 lines (86 loc) · 2.22 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
94
[tool.django-stubs]
django_settings_module = "api.settings"
[tool.mypy]
allow_untyped_globals = true
allow_redefinition = true
check_untyped_defs = true
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
show_traceback = true
warn_redundant_casts = true
warn_unused_ignores = true
plugins = [
"mypy_django_plugin.main"
]
exclude = [
"tests/"
]
[[tool.mypy.overrides]]
module = ["apps.*.migrations.*"]
ignore_errors = true
[tool.ruff]
target-version = "py310"
line-length = 120
[tool.ruff.lint]
select = [
"ASYNC",
"B",
"C4",
"D",
"DTZ",
"E",
"F",
"FURB",
"G",
"I",
"ISC001",
"ISC002",
"LOG",
"PGH",
"PIE",
"PT",
"PYI",
"RET",
"T20",
"UP",
"W"
]
ignore = [
"B009", # Do not call getattr with a constant value
"B010", # Do not call setattr with a constant value
"B023", # Function definition does not bind loop variable
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic method
"D106", # Missing docstring in public nested class
"D107", # Missing docstring in __init__
"D202", # No blank lines allowed after function docstring
"D203", # 1 blank line required before class docstring
"D206", # Docstring should be indented with spaces, not tabs
"D213", # Multi-line docstring summary should start at the second line
"D407", # Missing dashed underline after section
"E501", # Line too long
"PT019", # Fixture without value is injected as parameter, use @pytest.mark.usefixtures instead
"PYI041", # Use `float` instead of `int | float`
"RET504" # Unnecessary assignment before return statement
]
[tool.ruff.lint.isort.sections]
django = ["django"]
rest-framework = ["rest-framework"]
[tool.ruff.lint.isort]
known-first-party = ["apps"]
section-order = [
"future",
"standard-library",
"django",
"rest-framework",
"third-party",
"first-party",
"local-folder",
]