Fix missing types in builtins/__builtin__ (#3705)

* Fix missing type in builtins/__builtin__

* Add return type to memoryview cast
This commit is contained in:
Rune Tynan
2020-02-03 01:13:48 -05:00
committed by GitHub
parent 3e9f03015b
commit e8f85d9479
2 changed files with 4 additions and 4 deletions

View File

@@ -803,7 +803,7 @@ class memoryview(Sized, Container[_mv_container_type]):
def __init__(self, obj: Union[bytes, bytearray, memoryview]) -> None: ...
def __enter__(self) -> memoryview: ...
def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> None: ...
def cast(self, format: str, shape: Union[List[int], Tuple[int]] = ...): ...
def cast(self, format: str, shape: Union[List[int], Tuple[int]] = ...) -> memoryview: ...
else:
def __init__(self, obj: Union[bytes, bytearray, buffer, memoryview]) -> None: ...
@@ -1557,7 +1557,7 @@ class BufferError(_StandardError): ...
class EOFError(_StandardError): ...
class ImportError(_StandardError):
if sys.version_info >= (3, 3):
def __init__(self, *args, name: Optional[str] = ..., path: Optional[str] = ...) -> None: ...
def __init__(self, *args: object, name: Optional[str] = ..., path: Optional[str] = ...) -> None: ...
name: Optional[str]
path: Optional[str]
class LookupError(_StandardError): ...

View File

@@ -803,7 +803,7 @@ class memoryview(Sized, Container[_mv_container_type]):
def __init__(self, obj: Union[bytes, bytearray, memoryview]) -> None: ...
def __enter__(self) -> memoryview: ...
def __exit__(self, exc_type: Optional[Type[BaseException]], exc_val: Optional[BaseException], exc_tb: Optional[TracebackType]) -> None: ...
def cast(self, format: str, shape: Union[List[int], Tuple[int]] = ...): ...
def cast(self, format: str, shape: Union[List[int], Tuple[int]] = ...) -> memoryview: ...
else:
def __init__(self, obj: Union[bytes, bytearray, buffer, memoryview]) -> None: ...
@@ -1557,7 +1557,7 @@ class BufferError(_StandardError): ...
class EOFError(_StandardError): ...
class ImportError(_StandardError):
if sys.version_info >= (3, 3):
def __init__(self, *args, name: Optional[str] = ..., path: Optional[str] = ...) -> None: ...
def __init__(self, *args: object, name: Optional[str] = ..., path: Optional[str] = ...) -> None: ...
name: Optional[str]
path: Optional[str]
class LookupError(_StandardError): ...