-
-
Notifications
You must be signed in to change notification settings - Fork 379
Closed
Labels
Description
As per some gitter banter we should more publicly expose the Nursery, CancelScope and Taskstatus types for use as type annotations.
Currently client code is stuck importing most of these from internal private modules which leads the following beauty:
async def _async_main(
self,
accept_addr: Tuple[str, int],
arbiter_addr: Optional[Tuple[str, int]] = None,
parent_addr: Optional[Tuple[str, int]] = None,
task_status: trio._core._run._TaskStatus = trio.TASK_STATUS_IGNORED,
) -> None:
...Worth noting:
CancelScopemay already be exposed soon via idea: unbound cancel scopes #607- @njsmith and @Fuyukai already seems interested in adding them internally as per Provide PEP 484-style type hints #543
malinoff and jquigley3