-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
65 lines (56 loc) · 1.46 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
[tool.black]
line-length = 120
target-version = ['py311']
include = '\.pyi?$'
exclude = '(venv/*|env/*|.*/migrations)'
[tool.ruff]
line-length = 120
extend-exclude = ['venv', 'env', 'migrations']
select = [
'F', # pyflakes
'E', # pycodestyle
'W', # pycodestyle
'I', # isort
'UP', # pyupgrade
'B', # flake8-bugbear
'C', # flake8-comprehensions
'DTZ', # flake8-datetimez
'DJ', # flake8-django
'RUF', # ruff
]
ignore = [
'DJ001', # igonre nullable caracter field
'E501', # line too long, handled by black
'C901', # complex structure, not needed
]
[tool.ruff.per-file-ignores]
'project/settings/*.py' = [
'F403', # undefined local with import star
'F405', # undefined local with import star usage
'E402', # module import not at top of file
]
'__init__.py' = [
'F401', # unused import
'E402', # module import not at top of file
]
[tool.ruff.pyflakes]
extend-generics = [
'django.db.models.ForeignKey',
'django.db.models.ForeignObject',
'django.db.models.OneToOneField',
'django.db.models.Manager',
]
[tool.mypy]
python_version = '3.11'
warn_return_any = true
warn_unused_configs = true
allow_redefinition = false
disallow_untyped_defs = true
no_implicit_optional = true
check_untyped_defs = false
exclude = ['project/.*']
[[tool.mypy.overrides]]
module = ['simple_history.*']
ignore_missing_imports = true
[tool.coverage.run]
omit = ['project/*', 'manage.py', '*/migrations/*']