Skip to content

[wurlitzer] Complete stubs #14292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pyrightconfig.stricter.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@
"stubs/tqdm",
"stubs/vobject",
"stubs/workalendar",
"stubs/wurlitzer",
],
"typeCheckingMode": "strict",
// TODO: Complete incomplete stubs
Expand Down
11 changes: 10 additions & 1 deletion stubs/wurlitzer/wurlitzer.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import io
import logging
from _typeshed import SupportsWrite
from contextlib import _GeneratorContextManager
from threading import Thread
from types import TracebackType
from typing import Any, Final, Literal, Protocol, TextIO, TypeVar, overload
from typing_extensions import Self, TypeAlias
Expand All @@ -29,6 +30,10 @@ _InteractiveShell: TypeAlias = Any
class Wurlitzer:
flush_interval: float
encoding: str | None
thread: Thread | None
handle: tuple[
_LogPipe | SupportsWrite[str] | SupportsWrite[bytes] | None, _LogPipe | SupportsWrite[str] | SupportsWrite[bytes] | None
]

def __init__(
self,
Expand All @@ -37,7 +42,11 @@ class Wurlitzer:
encoding: str | None = ...,
bufsize: int | None = ...,
) -> None: ...
def __enter__(self): ...
def __enter__(
self,
) -> tuple[
_LogPipe | SupportsWrite[str] | SupportsWrite[bytes] | None, _LogPipe | SupportsWrite[str] | SupportsWrite[bytes] | None
]: ...
def __exit__(
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
) -> None: ...
Expand Down