Skip to content

Commit e93fdf1

Browse files
committed
Add noqa for new ruff warning
1 parent 3ced7fc commit e93fdf1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/trio/_core/_traps.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ class PermanentlyDetachCoroutineObject:
6666
def _real_async_yield(
6767
obj: MessageType,
6868
) -> Generator[MessageType, None, None]:
69-
return (yield obj)
69+
# "Using `yield` and `return {value}` in a generator function can
70+
# lead to confusing behavior"
71+
return (yield obj) # noqa: B901
7072

7173

7274
# Real yield value is from trio's main loop, but type checkers can't

0 commit comments

Comments
 (0)