mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Python 3.14: PEP-784 compression.zstd (#14129)
This commit is contained in:
+6
-5
@@ -2,7 +2,8 @@ import sys
|
||||
from _bz2 import BZ2Compressor as BZ2Compressor, BZ2Decompressor as BZ2Decompressor
|
||||
from _typeshed import ReadableBuffer, StrOrBytesPath, WriteableBuffer
|
||||
from collections.abc import Iterable
|
||||
from typing import IO, Literal, Protocol, SupportsIndex, TextIO, overload
|
||||
from io import TextIOWrapper
|
||||
from typing import IO, Literal, Protocol, SupportsIndex, overload
|
||||
from typing_extensions import Self, TypeAlias
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
@@ -48,7 +49,7 @@ def open(
|
||||
encoding: str | None = None,
|
||||
errors: str | None = None,
|
||||
newline: str | None = None,
|
||||
) -> TextIO: ...
|
||||
) -> TextIOWrapper: ...
|
||||
@overload
|
||||
def open(
|
||||
filename: _WritableFileobj,
|
||||
@@ -66,7 +67,7 @@ def open(
|
||||
encoding: str | None = None,
|
||||
errors: str | None = None,
|
||||
newline: str | None = None,
|
||||
) -> TextIO: ...
|
||||
) -> TextIOWrapper: ...
|
||||
@overload
|
||||
def open(
|
||||
filename: StrOrBytesPath,
|
||||
@@ -84,7 +85,7 @@ def open(
|
||||
encoding: str | None = None,
|
||||
errors: str | None = None,
|
||||
newline: str | None = None,
|
||||
) -> TextIO: ...
|
||||
) -> TextIOWrapper: ...
|
||||
@overload
|
||||
def open(
|
||||
filename: StrOrBytesPath | _ReadableFileobj | _WritableFileobj,
|
||||
@@ -93,7 +94,7 @@ def open(
|
||||
encoding: str | None = None,
|
||||
errors: str | None = None,
|
||||
newline: str | None = None,
|
||||
) -> BZ2File | TextIO: ...
|
||||
) -> BZ2File | TextIOWrapper: ...
|
||||
|
||||
class BZ2File(BaseStream, IO[bytes]):
|
||||
def __enter__(self) -> Self: ...
|
||||
|
||||
Reference in New Issue
Block a user