-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
243 lines (202 loc) · 4.49 KB
/
pyproject.toml
File metadata and controls
243 lines (202 loc) · 4.49 KB
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "statsd_python"
authors = [
{ name = "Charles Lirsac", email = "code@lirsac.com" }
]
license = "MIT"
description = ""
readme = {"file" = "README.md", "content-type" = "text/markdown"}
keywords = ["statsd", "metrics"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Natural Language :: English",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = ["version"]
requires-python = ">=3.8"
dependencies = [
"typing_extensions>=4",
]
[project.urls]
"Bug Reports" = "https://github.com/lirsacc/statsd_client_python/issues"
"Source" = "https://github.com/lirsacc/statsd_client_python"
[tool.hatch.version]
path = "src/statsd/version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/statsd"]
[tool.hatch.build.targets.sdist]
packages = ["src/statsd"]
only-include = ["src/statsd", "docs/build", "CHANGELOG.md"]
artifacts = ["docs/build"]
[tool.hatch.build.targets.sdist.sources]
"docs/build" = "docs"
[tool.uv.pip]
no-emit-package = ["setuptools", "pip", "wheel"]
no-strip-extras = true
emit-index-url = true
[tool.isort]
indent = 4
force_grid_wrap = 0
include_trailing_comma = true
line_length = 80
multi_line_output = 3
use_parentheses = true
combine_as_imports = true
atomic = true
lines_after_imports = 2
default_section = "THIRDPARTY"
float_to_top = true
sections = "FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,LOCALFOLDER"
known_first_party = "statsd"
extra_standard_library = "typing_extensions"
[tool.ruff]
line-length = 80
target-version = "py38"
[tool.ruff.format]
preview = true
[tool.ruff.lint]
preview = true
pycodestyle.max-line-length = 100
select = [
# Fairly standard and broadly applicable
"E",
"W",
"F",
"A",
"B",
"C",
"T",
"C4",
"COM",
"T10",
"TID",
"RUF",
# Less standard but useful and not too noisy
"ARG",
"BLE",
"C90",
"FBT",
"FLY",
"ICN",
"INP",
"LOG",
"Q",
"SLOT",
"YTT",
"G",
"D", # pydocstyle
"D213",
"UP", # pyupgrade
# Simplify type annotations
"FA",
"ANN",
"TCH",
"PT", # pytest
# For considerations
# "PL", Pylint, fairly noisy for now
# "SIM", Can be noisy
# "ERA",
# "PIE",
# "ASYNC", Not applicable to this lib
# "DJ", Not applicable to this lib
]
ignore = [
"I", # we use isort
"ANN401",
"D100",
"D105",
"D107",
"D212",
]
unfixable = [
"B", # Avoid trying to fix flake8-bugbear (`B`) violations.
]
exclude = [
"docs/**/*.py",
]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.ruff.lint.per-file-ignores]
"noxfile.py" = [
"D",
]
"tests/**/*.py" = [
"D",
]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.mypy]
strict = true
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
strict_equality = true
strict_concatenate = true
check_untyped_defs = true
disallow_any_generics = true
mypy_path = "src"
exclude = [
"^.nox",
]
[tool.pytest.ini_options]
filterwarnings = [
"error::DeprecationWarning",
]
addopts = [
"--color=yes",
"--doctest-modules",
"--doctest-continue-on-failure",
"--doctest-glob=**/*.doctest",
"--doctest-glob=**/*.rst"
]
doctest_optionflags = [
"IGNORE_EXCEPTION_DETAIL",
"ALLOW_UNICODE",
"ELLIPSIS",
"NORMALIZE_WHITESPACE",
]
testpaths = ["src", "tests", "docs"]
junit_family = "xunit2"
[tool.coverage.run]
branch = true
source = ["statsd"]
omit = ["*_test.py"]
[tool.coverage.paths]
source = [
"src/",
]
[tool.coverage.report]
show_missing = false
precision = 2
ignore_errors = false
exclude_lines = [
"pragma: no cover",
"assert False",
"raise AssertionError",
"raise NotImplementedError",
"raise NotImplementedError()",
"if 0:",
"if __name__ == .__main__.:",
"def __repr__",
"def __str__",
"if TYPE_CHECKING:",
]
[tool.coverage.html]
directory = "htmlcov"
[tool.coverage.xml]
output = "coverage.xml"