Skip to content

Commit 5ad57e9

Browse files
committed
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.
1 parent 01c2fa5 commit 5ad57e9

File tree

1 file changed

+591
-17
lines changed

1 file changed

+591
-17
lines changed

0 commit comments

Comments
 (0)