mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import io
|
||||
from _typeshed import ReadableBuffer, WriteableBuffer
|
||||
from typing import IO, Any, Iterable, List, Optional, Text, TypeVar, Union
|
||||
from typing import IO, Any, Iterable, List, Text, TypeVar, Union
|
||||
from typing_extensions import SupportsIndex
|
||||
|
||||
_PathOrFile = Union[Text, IO[bytes]]
|
||||
@@ -11,10 +11,8 @@ def decompress(data: bytes) -> bytes: ...
|
||||
|
||||
class BZ2File(io.BufferedIOBase, IO[bytes]):
|
||||
def __enter__(self: _T) -> _T: ...
|
||||
def __init__(
|
||||
self, filename: _PathOrFile, mode: str = ..., buffering: Optional[Any] = ..., compresslevel: int = ...
|
||||
) -> None: ...
|
||||
def read(self, size: Optional[int] = ...) -> bytes: ...
|
||||
def __init__(self, filename: _PathOrFile, mode: str = ..., buffering: Any | None = ..., compresslevel: int = ...) -> None: ...
|
||||
def read(self, size: int | None = ...) -> bytes: ...
|
||||
def read1(self, size: int = ...) -> bytes: ...
|
||||
def readline(self, size: SupportsIndex = ...) -> bytes: ... # type: ignore
|
||||
def readinto(self, b: WriteableBuffer) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user