Skip to content

Commit 316e11e

Browse files
committed
[multiprocessing] DefaultContext.get_start_method can return None
1 parent 39bd2d6 commit 316e11e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎stdlib/multiprocessing/context.pyi‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,11 @@ class DefaultContext(BaseContext):
175175
else:
176176
def __init__(self, context: BaseContext) -> None: ...
177177

178-
def get_start_method(self, allow_none: bool = False) -> str: ...
178+
@overload
179+
def get_start_method(self, allow_none: Literal[False] = False) -> str: ...
180+
@overload
181+
def get_start_method(self, allow_none: bool) -> str | None: ...
182+
179183
def get_all_start_methods(self) -> list[str]: ...
180184

181185
_default_context: DefaultContext

0 commit comments

Comments
 (0)