mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
gzip: improve bytes handling (#9037)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import _compression
|
||||
import sys
|
||||
import zlib
|
||||
from _typeshed import ReadableBuffer, StrOrBytesPath
|
||||
from _typeshed import ReadableBuffer, StrOrBytesPath, _BufferWithLen
|
||||
from io import FileIO
|
||||
from typing import Any, Protocol, TextIO, overload
|
||||
from typing_extensions import Literal, TypeAlias
|
||||
@@ -159,9 +159,9 @@ class _GzipReader(_compression.DecompressReader):
|
||||
def __init__(self, fp: _ReadableFileobj) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def compress(data: bytes, compresslevel: int = ..., *, mtime: float | None = ...) -> bytes: ...
|
||||
def compress(data: _BufferWithLen, compresslevel: int = ..., *, mtime: float | None = ...) -> bytes: ...
|
||||
|
||||
else:
|
||||
def compress(data: bytes, compresslevel: int = ...) -> bytes: ...
|
||||
def compress(data: _BufferWithLen, compresslevel: int = ...) -> bytes: ...
|
||||
|
||||
def decompress(data: bytes) -> bytes: ...
|
||||
def decompress(data: ReadableBuffer) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user