mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add a fallback overload for bz2.open as exists in gzip.open and lzma.open (#6722)
This commit is contained in:
@@ -80,6 +80,15 @@ def open(
|
||||
errors: str | None = ...,
|
||||
newline: str | None = ...,
|
||||
) -> TextIO: ...
|
||||
@overload
|
||||
def open(
|
||||
filename: StrOrBytesPath | _ReadableFileobj | _WritableFileobj,
|
||||
mode: str,
|
||||
compresslevel: int = ...,
|
||||
encoding: str | None = ...,
|
||||
errors: str | None = ...,
|
||||
newline: str | None = ...,
|
||||
) -> BZ2File | TextIO: ...
|
||||
|
||||
class BZ2File(BaseStream, IO[bytes]):
|
||||
def __enter__(self: Self) -> Self: ...
|
||||
|
||||
Reference in New Issue
Block a user