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

Use Literal overloads to give better types to subprocess #3110

Merged
merged 2 commits into from
Jul 10, 2019
Merged

Commits on Jul 10, 2019

  1. Use Literal overloads to give better types to subprocess

    This gives better types to subprocess.check_output and subprocess.run
    by laboriously overloading using literals.
    
    To support `run`, I turned `CompletedProcess` into `_CompletedProcess[T]`
    with `CompletedProcess = _CompletedProcess[Any]`. I could pretty easily
    be convinced that it would be better to just make `CompletedProcess`
    generic, though.
    
    I'd like to do the same for Popen but need to make mypy support
    believing the type of `__new__` in order for that to work.
    msullivan committed Jul 10, 2019
    Configuration menu
    Copy the full SHA
    eb9d0bc View commit details
    Browse the repository at this point in the history
  2. some cleanups

    msullivan committed Jul 10, 2019
    Configuration menu
    Copy the full SHA
    a377673 View commit details
    Browse the repository at this point in the history