Skip to content

Commit 39cf394

Browse files
gschaffnerwaketzheng
andauthoredDec 5, 2024··
Avoid exposing extra variables key and value in anyio.abc (#833)
Co-authored-by: Waket Zheng <[email protected]>
1 parent a2150f5 commit 39cf394

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed
 

‎src/anyio/abc/__init__.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from __future__ import annotations
22

3-
from typing import Any
4-
53
from ._eventloop import AsyncBackend as AsyncBackend
64
from ._resources import AsyncResource as AsyncResource
75
from ._sockets import ConnectedUDPSocket as ConnectedUDPSocket
@@ -50,8 +48,8 @@
5048
from ..from_thread import BlockingPortal as BlockingPortal
5149

5250
# Re-export imports so they look like they live directly in this package
53-
key: str
54-
value: Any
55-
for key, value in list(locals().items()):
56-
if getattr(value, "__module__", "").startswith("anyio.abc."):
57-
value.__module__ = __name__
51+
for __value in list(locals().values()):
52+
if getattr(__value, "__module__", "").startswith("anyio.abc."):
53+
__value.__module__ = __name__
54+
55+
del __value

0 commit comments

Comments
 (0)
Please sign in to comment.