mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Fix missing types in builtins/__builtin__ (#3705)
* Fix missing type in builtins/__builtin__ * Add return type to memoryview cast
This commit is contained in:
@@ -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): ...
|
||||
|
||||
@@ -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): ...
|
||||
|
||||
Reference in New Issue
Block a user