python-trio / trio-typing

Type hints for Trio and related projects
Other
27 stars 13 forks source link

Mark many subprocess types as Optional #51

Closed tjstum closed 2 years ago

tjstum commented 2 years ago

I am adapting the open_process API for internal use, and so I need my own default argument values. For cwd= and env=, they do accept None (all the way down to the stdlib call).

However, mypy claims that these values can't be Optional.

tjstum commented 2 years ago

I specifically need cwd to be Optional, but I went through and did all of the ones that are technically Optional. If we want to compromise somewhere in the middle, I'd be happy to!