mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
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.