mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Add missing unittest.mock.patch attributes (#1882)
This commit is contained in:
committed by
Jelle Zijlstra
parent
2e278f2aeb
commit
3e85d6bb61
@@ -97,13 +97,6 @@ if sys.version_info >= (3, 3):
|
||||
def start(self) -> Any: ...
|
||||
def stop(self) -> Any: ...
|
||||
|
||||
class _patcher:
|
||||
def __call__(self, target: Any, new: Optional[Any] = ..., spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> Any: ...
|
||||
def object(self, target: Any, attribute: str, new: Optional[Any] = ..., spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch: ...
|
||||
def multiple(self, target: Any, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> Any: ...
|
||||
|
||||
patch = ... # type: _patcher
|
||||
|
||||
class _patch_dict:
|
||||
in_dict = ... # type: Any
|
||||
values = ... # type: Any
|
||||
@@ -116,6 +109,16 @@ if sys.version_info >= (3, 3):
|
||||
start = ... # type: Any
|
||||
stop = ... # type: Any
|
||||
|
||||
class _patcher:
|
||||
TEST_PREFIX = ... # type: str
|
||||
dict = ... # type: _patch_dict
|
||||
def __call__(self, target: Any, new: Optional[Any] = ..., spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> Any: ...
|
||||
def object(self, target: Any, attribute: str, new: Optional[Any] = ..., spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> _patch: ...
|
||||
def multiple(self, target: Any, spec: Optional[Any] = ..., create: bool = ..., spec_set: Optional[Any] = ..., autospec: Optional[Any] = ..., new_callable: Optional[Any] = ..., **kwargs: Any) -> Any: ...
|
||||
def stopall(self) -> None: ...
|
||||
|
||||
patch = ... # type: _patcher
|
||||
|
||||
class MagicMixin:
|
||||
def __init__(self, *args: Any, **kw: Any) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user