Change return annotation of Popen.poll to Optional[int] (#3986)

Fixes #3984
This commit is contained in:
Selim Belhaouane
2020-05-13 13:18:25 -04:00
committed by GitHub
parent 65b3ef91fd
commit 3ac1f86499
2 changed files with 2 additions and 2 deletions

View File

@@ -98,7 +98,7 @@ class Popen(Generic[_T]):
startupinfo: Optional[Any] = ...,
creationflags: int = ...) -> Popen[bytes]: ...
def poll(self) -> int: ...
def poll(self) -> Optional[int]: ...
def wait(self) -> int: ...
# morally: -> Tuple[Optional[bytes], Optional[bytes]]
def communicate(self, input: Optional[_TXT] = ...) -> Tuple[bytes, bytes]: ...

View File

@@ -1155,7 +1155,7 @@ class Popen(Generic[AnyStr]):
start_new_session: bool = ...,
pass_fds: Any = ...) -> Popen[Any]: ...
def poll(self) -> int: ...
def poll(self) -> Optional[int]: ...
if sys.version_info >= (3, 7):
def wait(self, timeout: Optional[float] = ...) -> int: ...
else: