-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
233 lines (212 loc) · 5.78 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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
[project]
authors = [
{name = "Cody Fincher", email = "[email protected]"},
{name = "Janek Nouvertné", email = "[email protected]"},
{name = "Jacob Coffee", email = "[email protected]"},
]
maintainers = [
{name = "Cody Fincher", email = "[email protected]"},
{name = "Janek Nouvertné", email = "[email protected]"},
{name = "Jacob Coffee", email = "[email protected]"},
]
keywords = [
"api",
"rest",
"asgi",
"litestar",
"starlite",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development",
"Typing :: Typed",
]
name = "project-template"
version = "0.1.0"
description = "project-template is a Python template project designed to simplify the setup of a new project."
readme = "README.md"
license = {text = "MIT"}
requires-python = ">=3.8,<4.0"
dependencies = [
"litestar[standard]",
]
[project.urls]
"Issue Tracker" = "https://github.com/litestar-org/project-template/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc"
Changelog = "https://github.com/litestar-org/project-template/releases/"
Twitter = "https://twitter.com/LitestarAPI"
Reddit = "https://www.reddit.com/r/litestarapi"
Discord = "https://discord.gg/MmcwxztmQb"
Blog = "https://blog.litestar.dev"
homepage = "https://litestar.dev/"
repository = "https://github.com/litestar-org/project-template"
documentation = "https://docs.litestar.dev/"
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling"]
[project.scripts]
app = "litestar.__main__:run_cli"
[tool.pdm.scripts]
lint = "pre-commit run --all-files"
test = "pytest"
docs-serve = "sphinx-autobuild docs docs/_build/ -j auto --watch src --watch docs --watch tests --port 8002"
ci = {composite = ["lint", "test"]}
[tool.pdm.dev-dependencies]
docs = [
"sphinx>=7.1.2",
"sphinx-autobuild>=2021.3.14",
"black>=23.9.1",
"httpx>=0.25.0",
"auto-pytabs[sphinx]>=0.4.0",
"sphinx-copybutton>=0.5.2",
"sphinx-toolbox>=3.5.0",
"blacken-docs>=1.16.0",
"sphinx-design>=0.5.0",
"sphinxcontrib-mermaid>=0.9.2",
"uvicorn>=0.23.2",
"litestar-sphinx-theme @ git+https://github.com/litestar-org/litestar-sphinx-theme.git",
]
lint = [
"black>=23.9.1",
"ruff>=0.0.289",
"codespell>=2.2.5",
"mypy>=1.5.1",
"pre-commit>=3.4.0",
"blacken-docs>=1.16.0",
"shellcheck-py>=0.9.0.5",
"pyright>=1.1.327",
"sourcery>=1.9.0",
]
test = [
"pytest>=7.4.2",
"pytest-asyncio>=0.21.1",
"pytest-cov>=4.1.0",
]
[tool.black]
line-length = 120
include = '\.pyi?$'
[tool.codespell]
ignore-words-list = "selectin"
skip = 'pdm.lock'
[tool.coverage.run]
omit = ["*/tests/*"]
[tool.coverage.report]
exclude_lines = [
'pragma: no cover',
'if TYPE_CHECKING:',
'raise NotImplementedError',
]
[tool.pytest.ini_options]
# addopts = "--ignore=examples"
asyncio_mode = "auto"
[tool.pyright]
include = ["src"]
exclude = ["tools"]
[tool.slotscheck]
strict-imports = false
[tool.mypy]
plugins = ["pydantic.mypy"]
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
warn_return_any = true
strict = true
disallow_untyped_decorators = true
disallow_any_generics = false
implicit_reexport = false
show_error_codes = true
[tool.ruff]
select = ["ALL"]
ignore = [
"A003", # flake8-builtins - class attribute {name} is shadowing a python builtin
"B010", # flake8-bugbear - do not call setattr with a constant attribute value
"D100", # pydocstyle - missing docstring in public module
"D101", # pydocstyle - missing docstring in public class
"D102", # pydocstyle - missing docstring in public method
"D103", # pydocstyle - missing docstring in public function
"D104", # pydocstyle - missing docstring in public package
"D105", # pydocstyle - missing docstring in magic method
"D106", # pydocstyle - missing docstring in public nested class
"D107", # pydocstyle - missing docstring in __init__
"D202", # pydocstyle - no blank lines allowed after function docstring
"D205", # pydocstyle - 1 blank line required between summary line and description
"D415", # pydocstyle - first line should end with a period, question mark, or exclamation point
"E501", # pycodestyle line too long, handled by black
"PLW2901" # pylint - for loop variable overwritten by assignment target
]
line-length = 120
src = ["src", "tests", "docs/examples"]
target-version = "py38"
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.mccabe]
max-complexity = 12
[tool.ruff.pep8-naming]
classmethod-decorators = [
"classmethod",
]
[tool.ruff.isort]
known-first-party = ["litestar", "tests", "examples"]
[tool.ruff.per-file-ignores]
"tests/**/*.*" = [
"A",
"ARG",
"B",
"BLE",
"C901",
"D",
"DTZ",
"EM",
"FBT",
"G",
"N",
"PGH",
"PIE",
"PLR",
"PLW",
"PTH",
"RSE",
"S",
"S101",
"SIM",
"TCH",
"TRY",
]
"docs/examples/tests/**/*.*" = [
"A",
"ARG",
"B",
"BLE",
"C901",
"D",
"DTZ",
"EM",
"FBT",
"G",
"N",
"PGH",
"PIE",
"PLR",
"PLW",
"PTH",
"RSE",
"S",
"S101",
"SIM",
"TCH",
"TRY",
]
"docs/**/*.*" = ["S", "B", "DTZ", "A", "TCH", "ERA", "D", "RET", "INP", "ARG", "TD", "FIX"]
"tools/**/*.*" = ["D", "ARG", "EM", "TRY", "G", "FBT", "ANN"]