-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
187 lines (167 loc) · 4.19 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
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
[build-system]
build-backend = "flit_core.buildapi"
requires = ["flit_core>=3.2,<4"]
[project]
authors = [{name = "klove"}]
dependencies = [
"django",
"flit<4,>=3.2"
]
description = "More migration commands to make development life simpler"
license = { file = "LICENSE.txt" }
name = "django-drifter"
requires-python = ">=3.10"
version = "0.1.1"
[project.optional-dependencies]
development = [
"django-stubs",
"interrogate",
"pyright",
"ruff"
]
testing = [
"coverage",
"pytest",
"pytest-cov",
"pytest-django",
"pytest-randomly",
"pytest-xdist",
"tox"
]
[tool.coverage.report]
exclude_lines = [
"if TYPE_CHECKING:",
"if __name__ == .__main__.:",
"pragma: no cover",
"raise NotImplementedError",
]
fail_under = 95
ignore_errors = true
omit = [
"build/*",
"conftest.py",
"dist/*",
"docs/*",
"setup.py",
"tests/*",
"venv/*",
]
show_missing = true
[tool.coverage.run]
branch = true
source = ["src"]
[tool.coverage.xml]
output = ".coverage.xml"
[tool.django-stubs]
django_settings_module = "tests.project.settings"
[tool.flit.module]
name = "drifter"
[tool.interrogate]
color = true
exclude = ["build", "conftest.py", "docs", "setup.py"]
fail-under = 75
ignore-init-method = true
ignore-init-module = false
ignore-magic = false
ignore-module = true
ignore-nested-classes = true
ignore-nested-functions = false
ignore-private = false
ignore-property-decorators = false
ignore-regex = ["^get$", "^mock_.*"]
ignore-semiprivate = false
omit-covered-files = true
quiet = false
verbose = 1
[tool.pyright]
exclude = ["build", "dist", "docs", "tests"]
ignore = ["tests"]
include = ["src"]
pythonVerion = "3.11"
reportMissingImports = "information"
reportMissingTypeStubs = "information"
reportUnknownMemberType = "information"
root = ["src"]
strict = ["src"]
typeCheckingMode = "strict"
useLibraryCodeForTypes = true
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "tests.project.settings"
django_find_project = false
markers = []
norecursedirs = [".devcontainer", ".git", ".mypy_cache", "__pycache__", "docs"]
pythonpath = [".", "src", "tests.project"]
testpaths = ["tests"]
[tool.ruff]
select = [
"ANN", # flake8-annotations
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"COM", # flake8-commas
"D", # pydocstyle
"DJ", # flake8-django
"E", # pycodestyle
"EM", # flake8-errmsg
"ERA", # flake8-eradicate
"F", # Pyflakes
"FBT", # flake8-boolean-trap
"G", # flake8-logging-format
"I", # isort
"INP", # flake8-no-pep420
"N", # pep8-naming
"PIE", # flake8-pie
"PT", # flake8-pytest
"PYI", # flake8-pyi
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raises
"RUF", # ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"T20", # flake8-print
"TCH", # flake8-type-checking
"TRY", # tryceratops
]
# ignore
ignore = ["ANN101", "COM812", "D203", "D211", "D213", "F403"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
extend-exclude = ["docs"]
ignore-init-module-imports = true
src = ["src", "tests"]
# Assume Python 3.10.
target-version = "py310"
indent-width = 4
line-length = 88
output-format = "pylint"
[tool.ruff.format]
indent-style = "space"
line-ending = "auto"
quote-style = "double"
skip-magic-trailing-comma = false
[tool.ruff.per-file-ignores]
"src/migrator/*.pyi" = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
]
"tests/**/test_*.py" = [
"ANN001", # Missing type annotation for function argument
"ANN002", # Missing type annotation for *args
"ANN003", # Missing type annotation for **kwargs
"ANN201", # Missing return type annotation for public function
"ANN202", # Missing return type annotation for private function
"FBT001", # Positional Boolean
"S101", # assert used
]
"src/migrator/management/commands/*.py" = [
"T201", # print() used
]
[tool.ruff.isort]
combine-as-imports = true
known-third-party = ["django"]
split-on-trailing-comma = true
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10