mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Make unittest.patch.* methods static (#7543)
This commit is contained in:
@@ -300,8 +300,8 @@ class _patcher:
|
||||
**kwargs: Any,
|
||||
) -> _patch[_Mock]: ...
|
||||
@overload
|
||||
@staticmethod
|
||||
def object( # type: ignore[misc]
|
||||
self,
|
||||
target: Any,
|
||||
attribute: str,
|
||||
new: _T,
|
||||
@@ -313,8 +313,8 @@ class _patcher:
|
||||
**kwargs: Any,
|
||||
) -> _patch[_T]: ...
|
||||
@overload
|
||||
@staticmethod
|
||||
def object(
|
||||
self,
|
||||
target: Any,
|
||||
attribute: str,
|
||||
*,
|
||||
@@ -325,8 +325,8 @@ class _patcher:
|
||||
new_callable: Any | None = ...,
|
||||
**kwargs: Any,
|
||||
) -> _patch[_Mock]: ...
|
||||
@staticmethod
|
||||
def multiple(
|
||||
self,
|
||||
target: Any,
|
||||
spec: Any | None = ...,
|
||||
create: bool = ...,
|
||||
@@ -335,7 +335,8 @@ class _patcher:
|
||||
new_callable: Any | None = ...,
|
||||
**kwargs: Any,
|
||||
) -> _patch[Any]: ...
|
||||
def stopall(self) -> None: ...
|
||||
@staticmethod
|
||||
def stopall() -> None: ...
|
||||
|
||||
patch: _patcher
|
||||
|
||||
|
||||
Reference in New Issue
Block a user