mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Update gzip for 3.14 (#14237)
* Update gzip for 3.14 * [pre-commit.ci] auto fixes from pre-commit.com hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
+11
-2
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
import zlib
|
||||
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath
|
||||
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath, WriteableBuffer
|
||||
from io import FileIO, TextIOWrapper
|
||||
from typing import Final, Literal, Protocol, overload
|
||||
from typing_extensions import TypeAlias
|
||||
@@ -157,8 +157,17 @@ class GzipFile(BaseStream):
|
||||
def seek(self, offset: int, whence: int = 0) -> int: ...
|
||||
def readline(self, size: int | None = -1) -> bytes: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
def readinto(self, b: WriteableBuffer) -> int: ...
|
||||
def readinto1(self, b: WriteableBuffer) -> int: ...
|
||||
|
||||
class _GzipReader(DecompressReader):
|
||||
def __init__(self, fp: _ReadableFileobj) -> None: ...
|
||||
|
||||
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float | None = None) -> bytes: ...
|
||||
if sys.version_info >= (3, 14):
|
||||
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float = 0) -> bytes: ...
|
||||
|
||||
else:
|
||||
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float | None = None) -> bytes: ...
|
||||
|
||||
def decompress(data: ReadableBuffer) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user