mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Use PEP 688 (#10225)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import _compression
|
||||
import sys
|
||||
import zlib
|
||||
from _typeshed import ReadableBuffer, StrOrBytesPath, _BufferWithLen
|
||||
from _typeshed import ReadableBuffer, SizedBuffer, StrOrBytesPath
|
||||
from io import FileIO
|
||||
from typing import 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: _BufferWithLen, compresslevel: int = 9, *, mtime: float | None = None) -> bytes: ...
|
||||
def compress(data: SizedBuffer, compresslevel: int = 9, *, mtime: float | None = None) -> bytes: ...
|
||||
|
||||
else:
|
||||
def compress(data: _BufferWithLen, compresslevel: int = 9) -> bytes: ...
|
||||
def compress(data: SizedBuffer, compresslevel: int = 9) -> bytes: ...
|
||||
|
||||
def decompress(data: ReadableBuffer) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user