Skip to content

Commit 65eafd9

Browse files
brittanyreymeta-codesync[bot]
authored andcommitted
xlf_io: patch around * re-export limitation in stubs
Summary: Lifeguard only registers *named* re-exports for call resolution. Explicitly re-export the missing objects making `asyncio.Lock`/`asyncio.Event` show up as unknown objects. Reviewed By: alexmalyshev Differential Revision: D108178080 fbshipit-source-id: 450fe727b37730fd9e050a4440bc4929b5e20bb8
1 parent 6c618bb commit 65eafd9

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

resources/stubs/stdlib/asyncio/__init__.pyi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ from .events import *
1212
from .exceptions import *
1313
from .futures import *
1414
from .locks import *
15+
16+
# TODO(T275372839): have collect_re_exports follow star imports for class names
17+
# so this per-package stub workaround isn't needed. The `from .locks import *`
18+
# above doesn't register class names for call resolution.
19+
from .locks import (
20+
BoundedSemaphore as BoundedSemaphore,
21+
Condition as Condition,
22+
Event as Event,
23+
Lock as Lock,
24+
Semaphore as Semaphore,
25+
)
1526
from .protocols import *
1627
from .queues import *
1728
from .runners import *

0 commit comments

Comments
 (0)