The method returns a tuple of io.BytesIO objects that hold the temporary
stdin and stdout. By correcting the type, it allows usages of
io.BytesIO.getvalue() to pass type checking.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* fix(stubs/click): don't force autocompleter to accept anything as context
Additionally it's enough if it's return value is iterable (e.g. a
generator).
Eliminated the use of "bare" TypeVars (i.e. a TypeVar that appears only once) within generic methods. While not considered an error in PEP 484, these are a common source of bugs in code, and some type checkers (including pytype and pyright) flag them as errors.
Co-authored-by: Eric Traut <erictr@microsoft.com>