forked from falconry/falcon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
181 lines (163 loc) · 4.9 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
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=47",
"wheel>=0.34",
"cython>=3.0.8; python_implementation == 'CPython'", # Skip cython when using pypy
]
[tool.mypy]
exclude = [
"falcon/bench/|falcon/cmd/",
"falcon/vendor"
]
[[tool.mypy.overrides]]
module = [
"cbor2",
"cython",
"daphne",
"gunicorn",
"hypercorn",
"meinheld",
"msgpack",
"mujson",
"pyximport",
"testtools",
"uvicorn"
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
# Pure Cython modules
module = [
"falcon.cyutil.misc",
"falcon.cyutil.reader",
"falcon.cyutil.uri"
]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = [
"falcon.util.*",
"falcon.app_helpers",
"falcon.asgi_spec",
"falcon.constants",
"falcon.errors",
"falcon.forwarded",
"falcon.hooks",
"falcon.http_error",
"falcon.http_status",
"falcon.http_status",
"falcon.inspect",
"falcon.middleware",
"falcon.redirects",
"falcon.stream",
]
disallow_untyped_defs = true
[tool.towncrier]
package = "falcon"
package_dir = ""
filename = "docs/changes/4.0.0.rst"
directory = "docs/_newsfragments"
issue_format = "`#{issue} <https://github.com/falconry/falcon/issues/{issue}>`__"
# TODO(vytas): title_format = false seems to have no effect in towncrier==21.3.0.
# For now, we just have to remember to check the rendered changelog, and,
# if needed, remove the unwanted auto-generated title.
# See also: https://github.com/twisted/towncrier/issues/345.
title_format = false
[[tool.towncrier.type]]
directory = "breakingchange"
name = "Breaking Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "newandimproved"
name = "New & Improved"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Fixed"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Misc"
showcontent = true
[tool.black]
# this is kept to avoid reformatting all the code if one were to
# inadvertently run black on the project
target-version = ["py38"]
skip-string-normalization = true
line-length = 88
extend-exclude = "falcon/vendor"
[tool.blue]
# NOTE(vytas): Before switching to Ruff, Falcon used the Blue formatter.
# With the below settings, accidentally running blue should yield
# only minor cosmetic changes in a handful of files.
target-version = ["py38"]
line-length = 88
extend-exclude = "falcon/vendor"
[tool.ruff]
target-version = "py38"
format.quote-style = "single"
line-length = 88
extend-exclude = ["falcon/vendor"]
builtins = [
"ignore",
"attr",
"defined",
]
exclude = [
".ecosystem",
".eggs",
".git",
".tox",
".venv",
"build",
"dist",
"docs",
"examples",
"falcon/bench/nuts",
]
[tool.ruff.lint]
select = [
"C9",
"E",
"F",
"W",
"I"
]
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = [
"F401",
"E402",
"F403"
]
"falcon/uri.py" = ["F401"]
[tool.ruff.lint.isort]
case-sensitive = false
force-single-line = true
order-by-type = false
single-line-exclusions = [
"typing"
]
force-sort-within-sections = true
known-local-folder = ["asgilook", "look"]
[tool.pytest.ini_options]
filterwarnings = [
"ignore:Unknown REQUEST_METHOD. '(CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PUT|TRACE|CHECKIN|CHECKOUT|COPY|LOCK|MKCOL|MOVE|PROPFIND|PROPPATCH|REPORT|UNCHECKIN|UNLOCK|UPDATE|VERSION-CONTROL)':wsgiref.validate.WSGIWarning",
"ignore:Unknown REQUEST_METHOD. '(FOO|BAR|BREW|SETECASTRONOMY)':wsgiref.validate.WSGIWarning",
"ignore:\"@coroutine\" decorator is deprecated:DeprecationWarning",
"ignore:Using or importing the ABCs:DeprecationWarning",
"ignore:cannot collect test class 'TestClient':pytest.PytestCollectionWarning",
"ignore:inspect.getargspec\\(\\) is deprecated:DeprecationWarning",
"ignore:path is deprecated\\. Use files\\(\\) instead:DeprecationWarning",
"ignore:This process \\(.+\\) is multi-threaded",
]
markers = [
"slow: mark Falcon tests as slower (potentially taking more than ~500ms).",
]
testpaths = [
"tests"
]
[tool.cibuildwheel]
build-frontend = "build"
test-requires = ["-r requirements/cibwtest"]
test-command = "pytest {project}/tests"