Skip to content

Commit b7e89f2

Browse files
committed
Update tools configuration in pyproject.toml
This brings the config in sync with the latest repo-config templates, and it also fix the warning filtering for pytest. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent f5fdd3a commit b7e89f2

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

pyproject.toml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ check-yield-types = false
132132
arg-type-hints-in-docstring = false
133133
arg-type-hints-in-signature = true
134134
allow-init-docstring = true
135-
check-class-attributes = false
136135

137136
[tool.pylint.similarities]
138137
ignore-comments = ['yes']
@@ -147,11 +146,13 @@ disable = [
147146
# disabled because it conflicts with isort
148147
"wrong-import-order",
149148
"ungrouped-imports",
150-
# Checked by mypy (and pylint is very flaky checking these)
149+
# pylint's unsubscriptable check is buggy and is not needed because
150+
# it is a type-check, for which we already have mypy.
151151
"unsubscriptable-object",
152+
# Checked by mypy
152153
"no-member",
153-
"no-name-in-module",
154154
"possibly-used-before-assignment",
155+
"no-name-in-module",
155156
# Checked by flake8
156157
"f-string-without-interpolation",
157158
"line-too-long",
@@ -163,7 +164,15 @@ disable = [
163164
]
164165

165166
[tool.pytest.ini_options]
166-
addopts = "-W=all -Werror -Wdefault::DeprecationWarning -Wdefault::PendingDeprecationWarning -vv"
167+
addopts = "-vv"
168+
filterwarnings = [
169+
"error",
170+
"once::DeprecationWarning",
171+
"once::PendingDeprecationWarning",
172+
# We use a raw string (single quote) to avoid the need to escape special
173+
# chars as this is a regex
174+
'ignore:Protobuf gencode version .*exactly one major version older.*:UserWarning',
175+
]
167176
testpaths = ["tests", "src"]
168177
asyncio_mode = "auto"
169178
asyncio_default_fixture_loop_scope = "function"

0 commit comments

Comments
 (0)