Skip to content
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

subprocess: Fix return type of check_output. #348

Merged

Conversation

sharmaeklavya2
Copy link
Contributor

check_output's return type can be str if universal_newlines=True.

check_output's return type can be str if universal_newlines=True.
@@ -58,7 +58,7 @@ def check_output(args: Union[str, Sequence[str]],
creationflags: int = ...,
restore_signals: bool = ...,
start_new_session: bool = ...,
pass_fds: Any = ...) -> bytes: ...
pass_fds: Any = ...) -> Any: ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about Union[str, bytes] ?

Copy link
Contributor Author

@sharmaeklavya2 sharmaeklavya2 Jul 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disadvantages of using Union - python/mypy#1693.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aha, thanks

@matthiaskramm matthiaskramm merged commit e19e10c into python:master Jul 13, 2016
sharmaeklavya2 added a commit to sharmaeklavya2/rcvr that referenced this pull request Jul 13, 2016
mypy is currently broken and gives false errors on devel/lister.py.
See python/typeshed#348.
@sharmaeklavya2 sharmaeklavya2 deleted the fix-subprocess-check-output branch July 13, 2016 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants