mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Use PEP 585 syntax in Python 2, protobuf & _ast stubs, where possible (#6949)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import io
|
||||
from _typeshed import ReadableBuffer, Self, WriteableBuffer
|
||||
from typing import IO, Any, Iterable, List, Text, Union
|
||||
from typing import IO, Any, Iterable, Text, Union
|
||||
from typing_extensions import SupportsIndex
|
||||
|
||||
_PathOrFile = Union[Text, IO[bytes]]
|
||||
@@ -15,7 +15,7 @@ class BZ2File(io.BufferedIOBase, IO[bytes]):
|
||||
def read1(self, size: int = ...) -> bytes: ...
|
||||
def readline(self, size: SupportsIndex = ...) -> bytes: ... # type: ignore
|
||||
def readinto(self, b: WriteableBuffer) -> int: ...
|
||||
def readlines(self, size: SupportsIndex = ...) -> List[bytes]: ...
|
||||
def readlines(self, size: SupportsIndex = ...) -> list[bytes]: ...
|
||||
def seek(self, offset: int, whence: int = ...) -> int: ...
|
||||
def write(self, data: ReadableBuffer) -> int: ...
|
||||
def writelines(self, seq: Iterable[ReadableBuffer]) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user