diff --git a/stdlib/3/unittest/mock.pyi b/stdlib/3/unittest/mock.pyi index 1de1d07a9..14ed52219 100644 --- a/stdlib/3/unittest/mock.pyi +++ b/stdlib/3/unittest/mock.pyi @@ -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 diff --git a/third_party/2and3/mock.pyi b/third_party/2and3/mock.pyi index 1de1d07a9..14ed52219 100644 --- a/third_party/2and3/mock.pyi +++ b/third_party/2and3/mock.pyi @@ -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