-
-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathpyproject.toml
285 lines (256 loc) · 6.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
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
[project]
name = "Flask-JSONRPC"
version = "4.0.0a7"
description = "Adds JSONRPC support to Flask."
readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE.txt"}
authors = [{name = "Nycholas Oliveira", email = "[email protected]"}]
maintainers = [{name = "Cenobit Technologies Inc.", email = "[email protected]"}]
keywords = ["flask", "flask-extensions", "jsonrpc"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development :: Libraries :: Application Frameworks",
]
requires-python = ">=3.9"
dependencies = [
"Flask>=3.0.0,<4.0",
"typeguard==4.4.0",
"typing_extensions>=4.3.0",
"typing_inspect==0.9.0",
"pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4",
"eval_type_backport==0.2.0"
]
[project.optional-dependencies]
async = ["Flask[async]>=3.0.0,<4.0"]
dotenv = ["Flask[dotenv]>=3.0.0,<4.0"]
[project.urls]
Donate = "https://github.com/sponsors/nycholas"
Documentation = "https://flask-jsonrpc.readthedocs.io/"
"Source Code" = "https://github.com/cenobites/flask-jsonrpc"
"Issue Tracker" = "https://github.com/cenobites/flask-jsonrpc/issues/"
Website = "https://flask-jsonrpc.readthedocs.io/"
[build-system]
requires = ["flit_core>=3.2,<4"]
build-backend = "flit_core.buildapi"
[tool.flit.module]
name = "flask_jsonrpc"
[tool.flit.sdist]
include = [
"docs/",
"examples/",
"requirements/",
"tests/",
"tox.ini",
]
exclude = [
".tox/",
"venv/",
".venv/",
".venv.*/",
"**/venv/",
"**/.venv/",
"**/.venv.*",
"**/.tox/",
"**/junit/",
"**/htmlcov/",
"**/coverage.*",
"docs/_build/",
]
[tool.setuptools]
zip-safe = false
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[tool.cibuildwheel]
before-all = "uname -a"
build-verbosity = 1
skip = [
"cp3{8,9,10}-*",
"*-manylinux_i686",
"*-musllinux_i686",
"*-win32",
"pp*",
]
test-requires = [
"pytest",
"pytest-cov",
"pytest-xdist",
"pytest-sugar",
"pytest-env",
"requests"
]
test-command = "pytest -n auto -vv --tb=short --rootdir={project} {project}/tests --cov-fail-under=0"
[tool.cibuildwheel.environment]
MYPYC_ENABLE = "1"
[tool.ruff]
src = ["src"]
fix = true
show-fixes = true
output-format = "concise"
line-length = 120
target-version = "py39"
[tool.ruff.lint]
select = [
"E", # pycodestyle error
"W", # pycodestyle warning
"F", # pyflakes
"UP", # pyupgrade
"ANN", # flake8-annotations
"B", # flake8-bugbear
"Q", # flake8-quotes
"SIM", # flake8-simplify
"T", # flake8-type-checking
"B", # flake8-bandit
"C", # flake8-copyright
"I", # isort
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
docstring-quotes = "double"
[tool.ruff.lint.flake8-type-checking]
exempt-modules = ["typing", "typing_extensions", "annotated_types"]
[tool.ruff.lint.flake8-bandit]
check-typed-exception = true
[tool.ruff.lint.flake8-copyright]
author = "Cenobit Technologies, Inc. http://cenobit.es/"
[tool.ruff.lint.isort]
length-sort = true
combine-as-imports = true
order-by-type = true
force-sort-within-sections = true
split-on-trailing-comma = false
section-order = [
"future",
"standard-library",
"typing-extensions",
"flask",
"pydantic",
"third-party",
"first-party",
"local-folder"
]
[tool.ruff.lint.isort.sections]
"flask" = ["flask"]
"pydantic" = ["pydantic"]
"typing-extensions" = ["typing_inspect", "typing_extensions"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
skip-magic-trailing-comma = true
docstring-code-format = true
docstring-code-line-length = 79
[tool.pytest.ini_options]
addopts = "--pyargs --doctest-modules --junitxml=junit/test-results.xml --cov-report=html --cov-report=term --cov-report=lcov --cov=flask_jsonrpc --cov-fail-under=100"
junit_family = "xunit2"
python_files = ["tests.py", "test_*.py", "*_tests.py"]
pythonpath = "src/"
testpaths = [
"src/flask_jsonrpc",
"tests",
]
filterwarnings = [
"error",
"ignore::pytest.PytestUnraisableExceptionWarning"
]
norecursedirs = [
"tests/shared",
"tests/test_apps",
"tests/integration",
]
required_plugins = [
"pytest-cov",
"pytest-xdist",
"pytest-sugar",
"pytest-env",
]
[tool.coverage.run]
branch = true
source = [
"src/flask_jsonrpc",
"tests",
]
omit = [
"*/settings.py",
"*/fixtures.py",
"*/tests.py",
"*/test_*.py",
"*/*_tests.py",
]
[tool.coverage.paths]
source = [
"src",
"*/site-packages",
]
[tool.coverage.report]
fail_under = 100
ignore_errors = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
"pragma: no cover ${PRAGMA_VERSION}",
"def __repr__",
"if self\\.debug",
"if settings\\.DEBUG",
"if current_app\\.config\\['DEBUG'\\]",
"if app\\.config\\['DEBUG'\\]",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"if t\\.TYPE_CHECKING:",
]
[tool.mypy]
plugins = ["pydantic.mypy"]
files = ["src/flask_jsonrpc"]
python_version = "3.13"
pretty = true
strict = true
show_error_codes = true
ignore_errors = false
ignore_missing_imports = false
warn_redundant_casts = true
warn_unused_ignores = true
no_implicit_reexport = true
check_untyped_defs = true
disallow_any_generics = true
disallow_untyped_defs = true
[[tool.mypy.overrides]]
module = [
"asgiref.*",
"mypy-werkzeug.datastructures.*",
"typeguard.*",
"typing_inspect.*",
"dotenv.*",
]
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.pytype]
inputs = ["src/flask_jsonrpc"]
python_version = "3.11"
disable = ["invalid-annotation"]
[tool.pyright]
pythonVersion = "3.13"
include = ["src/flask_jsonrpc"]
typeCheckingMode = "basic"