Use PEP 688 (#10225)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Jelle Zijlstra
2023-05-27 19:55:30 -07:00
committed by GitHub
parent 56aeeb677f
commit c0a0c34020
16 changed files with 80 additions and 64 deletions

View File

@@ -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: ...