mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Fix patch.object to return a _patch context manager. (#1142)
* Fix patch.object to return a _patch context manager. This should fix https://github.com/python/typeshed/issues/914 * Prefer None over ... to be consistent with the rest of the file.
This commit is contained in:
committed by
Matthias Kramm
parent
6e75432504
commit
452c1e1d78
@@ -92,7 +92,11 @@ if sys.version_info >= (3, 3):
|
||||
def start(self) -> Any: ...
|
||||
def stop(self) -> Any: ...
|
||||
|
||||
def patch(target: Any, new: Any =..., spec: Any = None, create: Any = False, spec_set: Any = None, autospec: Any = None, new_callable: Any = None, **kwargs: Any) -> Any: ...
|
||||
class _patcher:
|
||||
def __call__(self, target: Any, new: Any = None, spec: Any = None, create: Any = False, spec_set: Any = None, autospec: Any = None, new_callable: Any = None, **kwargs: Any) -> Any: ...
|
||||
def object(self, target: Any, attribute: str, new: Any = None, spec: Any = None, create: Any = False, spec_set: Any = None, autospec: Any = None, new_callable: Any = None, **kwargs: Any) -> _patch: ...
|
||||
|
||||
patch = ... # type: _patcher
|
||||
|
||||
class _patch_dict:
|
||||
in_dict = ... # type: Any
|
||||
|
||||
Reference in New Issue
Block a user