mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
committed by
Guido van Rossum
parent
764ee4eeec
commit
a33a124537
@@ -1,5 +1,6 @@
|
||||
import io
|
||||
import sys
|
||||
from typing import Any, BinaryIO, IO, Optional, Union
|
||||
from typing import Any, IO, Optional, Union
|
||||
|
||||
if sys.version_info >= (3, 6):
|
||||
from os import PathLike
|
||||
@@ -20,7 +21,7 @@ if sys.version_info >= (3, 3):
|
||||
errors: Optional[str] = ...,
|
||||
newline: Optional[str] = ...) -> IO[Any]: ...
|
||||
|
||||
class BZ2File(BinaryIO):
|
||||
class BZ2File(io.BufferedIOBase, IO[bytes]): # type: ignore # python/mypy#5027
|
||||
def __init__(self,
|
||||
filename: _PathOrFile,
|
||||
mode: str = ...,
|
||||
|
||||
@@ -67,7 +67,7 @@ class LZMACompressor(object):
|
||||
class LZMAError(Exception): ...
|
||||
|
||||
|
||||
class LZMAFile(BinaryIO):
|
||||
class LZMAFile(io.BufferedIOBase, IO[bytes]): # type: ignore # python/mypy#5027
|
||||
def __init__(self,
|
||||
filename: Optional[_PathOrFile] = ...,
|
||||
mode: str = ...,
|
||||
@@ -84,7 +84,7 @@ class LZMAFile(BinaryIO):
|
||||
def readable(self) -> bool: ...
|
||||
def writable(self) -> bool: ...
|
||||
def peek(self, size: int = ...) -> bytes: ...
|
||||
def read(self, size: int = ...) -> bytes: ...
|
||||
def read(self, size: Optional[int] = ...) -> bytes: ...
|
||||
def read1(self, size: int = ...) -> bytes: ...
|
||||
def readline(self, size: int = ...) -> bytes: ...
|
||||
def write(self, data: bytes) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user