-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (116 loc) · 2.68 KB
/
Copy pathpyproject.toml
File metadata and controls
133 lines (116 loc) · 2.68 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Black code formatter configuration
[tool.black]
line-length = 88
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.mypy_cache
| \.tox
| \.venv
| venv
| _build
| buck-out
| build
| dist
| migrations
| __pycache__
| \.eggs
| \.hg
| \.nox
| \.pants\.d
| \.pytype
| \.ruff_cache
| \.svn
| \.env
| env
)/
'''
# mypy type checker configuration
[tool.mypy]
python_version = "3.10"
warn_return_any = false
warn_unused_configs = true
ignore_missing_imports = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = false
strict_equality = true
pretty = true
show_error_codes = true
show_column_numbers = true
show_error_context = true
plugins = ["mypy_django_plugin.main"]
# Exclude patterns
exclude = [
"venv/",
"env/",
".venv/",
"migrations/",
"tests/",
"__pycache__/",
"build/",
"dist/",
]
# Django-specific overrides
[[tool.mypy.overrides]]
module = "django.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "rest_framework.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "drf_spectacular.*"
ignore_missing_imports = true
# Django models have too many false positives with type checking
[[tool.mypy.overrides]]
module = "*.models"
ignore_errors = true
# Django migrations should be ignored
[[tool.mypy.overrides]]
module = "*.migrations.*"
ignore_errors = true
# Django admin uses decorators that confuse mypy
[[tool.mypy.overrides]]
module = "*.admin"
ignore_errors = true
# Allow untyped calls in test files
[[tool.mypy.overrides]]
module = "tests.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "*.tests.*"
ignore_errors = true
# External library with incomplete type stubs
[[tool.mypy.overrides]]
module = "pikepdf.*"
ignore_missing_imports = true
# DRF permissions have metaclass issues
[[tool.mypy.overrides]]
module = "*.permissions"
ignore_errors = true
# Serializers often have complex type interactions
[[tool.mypy.overrides]]
module = "*.serializers"
# Less strict for serializers - too many false positives with DRF stubs
ignore_errors = true
# Pagination classes have similar issues with DRF stubs
[[tool.mypy.overrides]]
module = "*.pagination"
ignore_errors = true
# Consumers use Channels which has incomplete type stubs
[[tool.mypy.overrides]]
module = "*.consumers"
ignore_errors = true
# Management commands have translation string type issues
[[tool.mypy.overrides]]
module = "*.management.commands.*"
ignore_errors = true
# Django-stubs configuration
[tool.django-stubs]
django_settings_module = "EduLite.settings"
strict_settings = false