-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
190 lines (173 loc) · 5.07 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
#####################
# Python packaging: #
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "asyncio-taskpool"
description = "Dynamically manage pools of asyncio tasks"
authors = [
{ name = "Daniil Fajnberg", email = "[email protected]" },
]
maintainers = [
{ name = "Daniil Fajnberg", email = "[email protected]" },
]
requires-python = ">=3.8, <4.0"
keywords = [
"asyncio",
"concurrency",
"coroutines",
"server",
"tasks",
]
license = { text = "GNU Lesser General Public License v3 (LGPLv3)" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Framework :: AsyncIO",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = [
"dependencies",
"readme",
"version",
]
[project.optional-dependencies]
dev = [
"black==23.9.1",
"build==1.0.3",
"coverage[toml]==7.3.2",
"isort==5.12.0",
"mypy==1.5.1",
"ruff==0.0.292",
"sphinx==7.1.2",
"sphinx-rtd-theme==1.3.0",
]
[project.urls]
"Repository" = "https://github.com/daniil-berg/asyncio-taskpool"
"Issue Tracker" = "https://github.com/daniil-berg/asyncio-taskpool/issues"
"Documentation" = "https://asyncio-taskpool.readthedocs.io/en/latest"
[tool.setuptools.dynamic]
dependencies = { file = "requirements/common.txt" }
readme = { file = ["README.md"], content-type = "text/markdown" }
version = { attr = "asyncio_taskpool.__version__" }
#########################
# Static type checking: #
[tool.mypy]
cache_dir = ".cache/mypy"
files = [
"src/",
"tests/",
]
warn_unused_configs = true
strict = true
show_error_codes = true
enable_incomplete_feature = [
"TypeVarTuple",
"Unpack",
]
plugins = []
#######################
# Unit test coverage: #
[tool.coverage.run]
data_file = ".cache/coverage"
source = [
"src/",
]
branch = true
command_line = "-m tests"
omit = [
".venv*/*",
]
[tool.coverage.report]
fail_under = 100
show_missing = true
skip_covered = false
exclude_lines = [
"if .*?sys.version.*:",
"if TYPE_CHECKING:",
'''if __name__ == ['"]__main__['"]:''',
"@overload",
]
exclude_also = [
'class \w+\(Protocol\):',
]
omit = [
"tests/*",
]
###############################
# Linting and style checking: #
[tool.ruff]
cache-dir = ".cache/ruff"
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"N", # pep8-naming
"D", # pydocstyle
"ANN", # flake8-annotations
"S", # flake8-bandit
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"C", # flake8-comprehensions
"PIE", # flake8-pie
"T20", # flake8-print
"RET", # flake8-return
"SIM", # flake8-simplify
"TD", # flake8-todos
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"TRY", # tryceratops
"RUF", # ruff-specific
]
ignore = [
"E501", # Line too long -> handled by black
"D203", # 1 blank line required before class docstring -> D211 is better
"D212", # Multi-line docstring summary should start at the first line -> ugly, D213 is better
"D401", # First line of docstring should be in imperative mood -> no, it shouldn't
"D406", # Section name should end with a newline -> using Google style instead
"D407", # Missing dashed underline after section -> different docstring style
"N818", # Exception name {name} should be named with an Error suffix -> no, it shouldn't
"ANN101", # Missing type annotation for self in method -> unnecessary
"ANN102", # Missing type annotation for cls in classmethod -> unnecessary
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed -> we'll use it sparingly
"TD002", # Missing author in "to do" -> only me for now
]
[tool.ruff.per-file-ignores]
"src/**/__init__.py" = [
"A001", # Variable {name} is shadowing a Python builtin
"D104", # Missing docstring in public package
"F401", # {...} imported but unused
]
"tests/*.py" = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D104", # Missing docstring in public package
"PLR0913", # Too many arguments to function call
"PLR0915", # Too many statements
]
####################
# Code formatting: #
[tool.black]
line_length = 80
###################
# Import sorting: #
[tool.isort]
profile = "black"
extra_standard_library = ["typing_extensions"]
classes = ["IO"]
line_length = 80