Added missing type annotations for mock.pyi. (#4415)

Co-authored-by: Eric Traut <erictr@microsoft.com>
This commit is contained in:
Eric Traut
2020-08-08 02:33:01 -07:00
committed by GitHub
parent e4b48edbba
commit 2fa7a8d8c3
2 changed files with 6 additions and 6 deletions

View File

@@ -72,7 +72,7 @@ class Base:
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
class NonCallableMock(Base, Any): # type: ignore
def __new__(cls, *args, **kw) -> NonCallableMock: ...
def __new__(cls, *args: Any, **kw: Any) -> NonCallableMock: ...
def __init__(
self,
spec: Union[List[str], object, Type[object], None] = ...,
@@ -86,7 +86,7 @@ class NonCallableMock(Base, Any): # type: ignore
_spec_as_instance: bool = ...,
_eat_self: Optional[bool] = ...,
unsafe: bool = ...,
**kwargs,
**kwargs: Any,
) -> None: ...
def __getattr__(self, name: str) -> Any: ...
if sys.version_info >= (3, 8):
@@ -116,7 +116,7 @@ class NonCallableMock(Base, Any): # type: ignore
def assert_any_call(self, *args: Any, **kwargs: Any) -> None: ...
def assert_has_calls(self, calls: Sequence[_Call], any_order: bool = ...) -> None: ...
def mock_add_spec(self, spec: Any, spec_set: bool = ...) -> None: ...
def _mock_add_spec(self, spec: Any, spec_set, _spec_as_instance: bool = ..., _eat_self: bool = ...) -> None: ...
def _mock_add_spec(self, spec: Any, spec_set: bool, _spec_as_instance: bool = ..., _eat_self: bool = ...) -> None: ...
def attach_mock(self, mock: NonCallableMock, attribute: str) -> None: ...
def configure_mock(self, **kwargs: Any) -> None: ...
return_value: Any