Skip to content

Commit

Permalink
Fix timeout argument type hint
Browse files Browse the repository at this point in the history
It can be None according to the code and the documentation
  • Loading branch information
m417z authored and atagar committed Feb 15, 2024
1 parent 9a9c7d4 commit fc3394a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stem/process.py
Expand Up @@ -35,7 +35,7 @@
DEFAULT_INIT_TIMEOUT = 90


def launch_tor(tor_cmd: str = 'tor', args: Optional[Sequence[str]] = None, torrc_path: Optional[str] = None, completion_percent: int = 100, init_msg_handler: Optional[Callable[[str], None]] = None, timeout: int = DEFAULT_INIT_TIMEOUT, take_ownership: bool = False, close_output: bool = True, stdin: Optional[str] = None) -> subprocess.Popen:
def launch_tor(tor_cmd: str = 'tor', args: Optional[Sequence[str]] = None, torrc_path: Optional[str] = None, completion_percent: int = 100, init_msg_handler: Optional[Callable[[str], None]] = None, timeout: Optional[int] = DEFAULT_INIT_TIMEOUT, take_ownership: bool = False, close_output: bool = True, stdin: Optional[str] = None) -> subprocess.Popen:
"""
Initializes a tor process. This blocks until initialization completes or we
error out.
Expand Down Expand Up @@ -199,7 +199,7 @@ def timeout_handler(signum: int, frame: Any) -> None:
pass


def launch_tor_with_config(config: Dict[str, Union[str, Sequence[str]]], tor_cmd: str = 'tor', completion_percent: int = 100, init_msg_handler: Optional[Callable[[str], None]] = None, timeout: int = DEFAULT_INIT_TIMEOUT, take_ownership: bool = False, close_output: bool = True) -> subprocess.Popen:
def launch_tor_with_config(config: Dict[str, Union[str, Sequence[str]]], tor_cmd: str = 'tor', completion_percent: int = 100, init_msg_handler: Optional[Callable[[str], None]] = None, timeout: Optional[int] = DEFAULT_INIT_TIMEOUT, take_ownership: bool = False, close_output: bool = True) -> subprocess.Popen:
"""
Initializes a tor process, like :func:`~stem.process.launch_tor`, but with a
customized configuration. This writes a temporary torrc to disk, launches
Expand Down

0 comments on commit fc3394a

Please sign in to comment.