Skip to content

Commit

Permalink
use protocol for inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
hoel-bagard committed Feb 21, 2024
1 parent 378b2d0 commit b29f750
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions stubs/wurlitzer/wurlitzer.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import contextlib
import io
from _typeshed import SupportsWrite
from collections.abc import Iterator
from contextlib import contextmanager
from types import TracebackType
Expand All @@ -22,8 +23,8 @@ class Wurlitzer:

def __init__(
self,
stdout: TextIO | io.IOBase | None = None,
stderr: _STDOUT | TextIO | io.IOBase | None = None,
stdout: SupportsWrite[str | bytes] | None = None,
stderr: _STDOUT | SupportsWrite[str | bytes] | None = None,
encoding: str = ...,
bufsize: int | None = ...,
) -> None: ...
Expand All @@ -38,7 +39,10 @@ def sys_pipes(
) -> contextlib._GeneratorContextManager[tuple[TextIO | io.BytesIO | io.StringIO, TextIO | io.BytesIO | io.StringIO | None]]: ...
@contextmanager
def pipes(
stdout: _PIPE | TextIO = 3, stderr: _STDOUT | _PIPE | TextIO = 3, encoding: str = ..., bufsize: int | None = None
stdout: _PIPE | SupportsWrite[str | bytes] = 3,
stderr: _STDOUT | _PIPE | SupportsWrite[str | bytes] = 3,
encoding: str = ...,
bufsize: int | None = None,
) -> Iterator[tuple[TextIO | io.BytesIO | io.StringIO, TextIO | io.BytesIO | io.StringIO | None]]: ...
def sys_pipes_forever(encoding: str = ..., bufsize: int | None = None): ...
def stop_sys_pipes() -> None: ...
Expand Down

0 comments on commit b29f750

Please sign in to comment.