Skip to content

Make the type of timeout Optional[float] everywhere in subprocess. #3241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions stdlib/3/subprocess.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def call(args: _CMD,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: float = ...) -> int: ...
timeout: Optional[float] = ...) -> int: ...

# Same args as Popen.__init__
def check_call(args: _CMD,
Expand All @@ -471,7 +471,7 @@ def check_call(args: _CMD,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: float = ...) -> int: ...
timeout: Optional[float] = ...) -> int: ...

if sys.version_info >= (3, 7):
# 3.7 added text
Expand All @@ -493,7 +493,7 @@ if sys.version_info >= (3, 7):
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: Optional[str] = ...,
errors: Optional[str] = ...,
Expand All @@ -517,7 +517,7 @@ if sys.version_info >= (3, 7):
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: str,
errors: Optional[str] = ...,
Expand All @@ -541,7 +541,7 @@ if sys.version_info >= (3, 7):
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: Optional[str] = ...,
errors: str,
Expand All @@ -566,7 +566,7 @@ if sys.version_info >= (3, 7):
start_new_session: bool = ...,
pass_fds: Any = ...,
# where the real keyword only ones start
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: Optional[str] = ...,
errors: Optional[str] = ...,
Expand All @@ -590,7 +590,7 @@ if sys.version_info >= (3, 7):
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: None = ...,
errors: None = ...,
Expand All @@ -614,7 +614,7 @@ if sys.version_info >= (3, 7):
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: Optional[str] = ...,
errors: Optional[str] = ...,
Expand All @@ -640,7 +640,7 @@ elif sys.version_info >= (3, 6):
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: str,
errors: Optional[str] = ...,
Expand All @@ -663,7 +663,7 @@ elif sys.version_info >= (3, 6):
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: Optional[str] = ...,
errors: str,
Expand All @@ -686,7 +686,7 @@ elif sys.version_info >= (3, 6):
pass_fds: Any = ...,
*,
universal_newlines: Literal[True],
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: Optional[str] = ...,
errors: Optional[str] = ...,
Expand All @@ -709,7 +709,7 @@ elif sys.version_info >= (3, 6):
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: None = ...,
errors: None = ...,
Expand All @@ -732,7 +732,7 @@ elif sys.version_info >= (3, 6):
start_new_session: bool = ...,
pass_fds: Any = ...,
*,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
encoding: Optional[str] = ...,
errors: Optional[str] = ...,
Expand All @@ -754,7 +754,7 @@ else:
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
*,
universal_newlines: Literal[True],
Expand All @@ -776,7 +776,7 @@ else:
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
) -> bytes: ...
@overload
Expand All @@ -796,7 +796,7 @@ else:
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...,
timeout: float = ...,
timeout: Optional[float] = ...,
input: _TXT = ...,
) -> Any: ... # morally: -> _TXT

Expand Down