mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Drop Python 3.8 branches (#13776)
This commit is contained in:
+9
-29
@@ -1,10 +1,9 @@
|
||||
import _compression
|
||||
import sys
|
||||
from _bz2 import BZ2Compressor as BZ2Compressor, BZ2Decompressor as BZ2Decompressor
|
||||
from _compression import BaseStream
|
||||
from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer
|
||||
from collections.abc import Iterable
|
||||
from typing import IO, Any, Literal, Protocol, SupportsIndex, TextIO, overload
|
||||
from typing import IO, Literal, Protocol, SupportsIndex, TextIO, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
__all__ = ["BZ2File", "BZ2Compressor", "BZ2Decompressor", "open", "compress", "decompress"]
|
||||
@@ -94,33 +93,14 @@ def open(
|
||||
|
||||
class BZ2File(BaseStream, IO[bytes]):
|
||||
def __enter__(self) -> Self: ...
|
||||
if sys.version_info >= (3, 9):
|
||||
@overload
|
||||
def __init__(self, filename: _WritableFileobj, mode: _WriteBinaryMode, *, compresslevel: int = 9) -> None: ...
|
||||
@overload
|
||||
def __init__(self, filename: _ReadableFileobj, mode: _ReadBinaryMode = "r", *, compresslevel: int = 9) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self, filename: StrOrBytesPath, mode: _ReadBinaryMode | _WriteBinaryMode = "r", *, compresslevel: int = 9
|
||||
) -> None: ...
|
||||
else:
|
||||
@overload
|
||||
def __init__(
|
||||
self, filename: _WritableFileobj, mode: _WriteBinaryMode, buffering: Any | None = None, compresslevel: int = 9
|
||||
) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self, filename: _ReadableFileobj, mode: _ReadBinaryMode = "r", buffering: Any | None = None, compresslevel: int = 9
|
||||
) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self,
|
||||
filename: StrOrBytesPath,
|
||||
mode: _ReadBinaryMode | _WriteBinaryMode = "r",
|
||||
buffering: Any | None = None,
|
||||
compresslevel: int = 9,
|
||||
) -> None: ...
|
||||
|
||||
@overload
|
||||
def __init__(self, filename: _WritableFileobj, mode: _WriteBinaryMode, *, compresslevel: int = 9) -> None: ...
|
||||
@overload
|
||||
def __init__(self, filename: _ReadableFileobj, mode: _ReadBinaryMode = "r", *, compresslevel: int = 9) -> None: ...
|
||||
@overload
|
||||
def __init__(
|
||||
self, filename: StrOrBytesPath, mode: _ReadBinaryMode | _WriteBinaryMode = "r", *, compresslevel: int = 9
|
||||
) -> None: ...
|
||||
def read(self, size: int | None = -1) -> bytes: ...
|
||||
def read1(self, size: int = -1) -> bytes: ...
|
||||
def readline(self, size: SupportsIndex = -1) -> bytes: ... # type: ignore[override]
|
||||
|
||||
Reference in New Issue
Block a user