forked from godd0t/django-docker-quickstart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
98 lines (82 loc) · 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
94
95
96
97
98
[project]
name = "project"
version = "0.1.0"
authors = ["Your Name <your.email@test.com>"]
# TESTING
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q --force-sugar --no-migrations --reuse-db --log-cli-level=INFO"
testpaths = [
"tests",
]
pythonpath = [".", "src"]
python_files = "tests.py test_*.py *_tests.py"
DJANGO_SETTINGS_MODULE = "project_name.settings.test"
filterwarnings = [
'ignore::DeprecationWarning:kombu.*:',
'ignore::DeprecationWarning:celery.*:',
]
[tool.coverage.report]
fail_under = 85
show_missing = "true"
exclude_lines = [
"pragma: no cover",
"raise NotImplementedError",
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"import*",
"def __str__",
"def on_success",
"def clean",
"if missing",
"if relations.exists()",
"(FileDoesNotExistException, FileNotSupportedException)",
]
[tool.coverage.run]
omit = [
"*/tests/*",
"*/migrations/*",
"*/urls.py",
"*/settings/*",
"*/wsgi.py",
"manage.py",
"*__init__.py",
]
source = ["src"]
# LINTING
[tool.black]
line-length = 88
target-version = ['py311']
include = '\.pyi?$'
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
^(.*/)?migrations/.*$
'''
[tool.ruff]
format = "grouped"
line-length = 88 # black default
extend-exclude = [
"src/migrations/*",
"src/media/*",
"src/static/*",
"src/manage.py",
"*/test_data/*",
"*__init__.py",
]
select = ["E", "F"]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"F405", # name may be undefined, or defined from star imports
]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.11.
target-version = "py311"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.isort]
force-to-top = ["src"]
known-first-party = ["src"]