From 24078f2d6e0e8f5a17c5f75e3ca42f577fe5fc0a Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 2 Dec 2021 08:12:20 -0500 Subject: [PATCH] More doc string style tweaks --- tractor/_entry.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tractor/_entry.py b/tractor/_entry.py index 0e31f32..c860f2b 100644 --- a/tractor/_entry.py +++ b/tractor/_entry.py @@ -33,15 +33,19 @@ log = get_logger(__name__) def _mp_main( + actor: 'Actor', # type: ignore accept_addr: Tuple[str, int], forkserver_info: Tuple[Any, Any, Any, Any, Any], start_method: str, parent_addr: Tuple[str, int] = None, infect_asyncio: bool = False, + ) -> None: - """The routine called *after fork* which invokes a fresh ``trio.run`` - """ + ''' + The routine called *after fork* which invokes a fresh ``trio.run`` + + ''' actor._forkserver_info = forkserver_info from ._spawn import try_set_start_method spawn_ctx = try_set_start_method(start_method) @@ -77,19 +81,17 @@ def _mp_main( def _trio_main( + actor: 'Actor', # type: ignore *, parent_addr: Tuple[str, int] = None, infect_asyncio: bool = False, + ) -> None: - """Entry point for a `trio_run_in_process` subactor. - """ - # Disable sigint handling in children; - # we don't need it thanks to our cancellation machinery. - # signal.signal(signal.SIGINT, signal.SIG_IGN) - - log.info(f"Started new trio process for {actor.uid}") + ''' + Entry point for a `trio_run_in_process` subactor. + ''' log.info(f"Started new trio process for {actor.uid}") if actor.loglevel is not None: