-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
160 lines (143 loc) · 4.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
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
[tool.poetry]
name = "asgi_bench"
version = "0.1.0"
description = "Benchmarks for Python ASGI frameworks"
authors = ["Na'aman Hirschfeld <nhirschfeld@gmail.com>", "Janek Nouvertné <j.a.nouvertne@posteo.de>"]
[tool.poetry.dependencies]
python = "^3.11"
pandas = "*"
docker = "*"
pyyaml = "^6.0.1"
httpx = "*"
uvloop = "*"
anyio = "*"
jinja2 = "^3.1.2"
uvicorn = "^0.23.1"
pydantic = "^1.10.2"
plotly = "^5.11.0"
kaleido = "0.2.1"
rich-click = "^1.6.1"
sanic = {extras = ["ext"], version = "^22.12.0", optional = true}
blacksheep = {version = "^1.2.10", optional = true}
starlette = {version = "^0.25.0", optional = true}
fastapi = {version = "^0.92.0", optional = true}
starlite = {version = "^1.51.12", optional = true}
python-multipart = {version = "^0.0.6", optional = true}
quart = {version = "^0.18.3", optional = true}
litestar = {version = "2.0b4", optional = true}
[tool.poetry.extras]
test = ["litestar", "starlite", "starlette", "fastapi", "blacksheep", "sanic", "python-multipart", "quart"]
[tool.poetry.scripts]
bench = "asgi_bench.cli:cli"
[tool.poetry.group.dev.dependencies]
pytest = "^7.2.0"
[tool.poetry.group.lint]
optional = true
[tool.poetry.group.lint.dependencies]
black = "^23.7.0"
ruff = "^0.0.280"
shellcheck-py = "^0.9.0.5"
pre-commit = "^3.3.3"
sourcery = "^1.6.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
include = '\.pyi?$'
[tool.ruff]
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # mccabe
"D", # pydocstyle
"DJ", # flake8-django
"DTZ", # flake8-datetimez
"E", # pycodestyle errors
"ERA", # eradicate
"EXE", # flake8-executable
"F", # pyflakes
"G", # flake8-logging-format
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"PIE", # flake8-pie
"PLC", # pylint - convention
"PLE", # pylint - error
"PLW", # pylint - warning
"PTH", # flake8-use-pathlib
"Q", # flake8-quotes
"RET", # flake8-return
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TID", # flake8-tidy-imports
"UP", # pyupgrade
"W", # pycodestyle - warning
"YTT", # flake8-2020
]
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
"RUF012", # Ruff-specific rule - annotated with classvar
]
line-length = 120
src = ["asgi_bench", "tests", "frameworks", "test_data"]
target-version = "py311"
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.mccabe]
max-complexity = 12
[tool.ruff.pep8-naming]
classmethod-decorators = [
"classmethod",
"pydantic.root_validator",
"pydantic.validator",
]
[tool.ruff.isort]
known-first-party = ["asgi_bench", "tests", "frameworks", "test_data"]
[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",
]
"frameworks/**/*.*" = ["B008", "B018"]