Make unittest.patch.* methods static (#7543)

This commit is contained in:
Sebastian Rittau
2022-11-01 13:09:56 +01:00
committed by GitHub
parent 96daaf60bf
commit e7e94dd101

View File

@@ -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