Skip to content

Commit 601acb8

Browse files
committed
asyncio banned apis
1 parent a59fd70 commit 601acb8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ allow-dict-calls-with-keyword-arguments = true
208208
"concurrent.futures" = "cf"
209209

210210
[tool.ruff.lint.flake8-tidy-imports.banned-api]
211+
212+
# typing apis first
213+
211214
# https://discuss.python.org/t/problems-with-typeis/55410/6
212215
# https://discuss.python.org/t/problems-with-typeis/55410/46
213216
# Until what can go into a TypeIs/TypeGuard changes, these are just dangerous.
@@ -229,6 +232,12 @@ allow-dict-calls-with-keyword-arguments = true
229232
# Arguably, much of the collections.abc APIs should be banned as well, but the use in this library is
230233
# aware of the problems.
231234

235+
# These are some asyncio APIs that are problematic
236+
237+
"asyncio.shield".msg = "This doesn't do what almost anyone thinks. Just don't use it."
238+
"asyncio.TaskGroup".msg = "see pep 789"
239+
"asyncio.Timeout".msg = "see pep 789"
240+
232241
[project]
233242
name = "mikeshardmind-async-utils"
234243
description = "Various async utilities"

0 commit comments

Comments
 (0)