mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-23 12:21:27 +08:00
Add several Python 3.8 annotations (#3347)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from typing import Any, IO, Optional
|
||||
from os.path import _PathType
|
||||
import _compression
|
||||
import sys
|
||||
import zlib
|
||||
|
||||
def open(filename, mode: str = ..., compresslevel: int = ..., encoding: Optional[str] = ..., errors: Optional[str] = ..., newline: Optional[str] = ...) -> IO[Any]: ...
|
||||
@@ -45,5 +46,8 @@ class _GzipReader(_compression.DecompressReader):
|
||||
def __init__(self, fp: IO[bytes]) -> None: ...
|
||||
def read(self, size: int = ...) -> bytes: ...
|
||||
|
||||
def compress(data, compresslevel: int = ...) -> bytes: ...
|
||||
if sys.version_info >= (3, 8):
|
||||
def compress(data, compresslevel: int = ..., *, mtime: Optional[float] = ...) -> bytes: ...
|
||||
else:
|
||||
def compress(data, compresslevel: int = ...) -> bytes: ...
|
||||
def decompress(data: bytes) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user