Update unittest.mock to 3.12 (#10650)

And harmonise some annotations between the stdlib `unittest.mock` module and the third-party `mock` backport package.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
Nikita Sobolev
2023-09-02 17:03:39 +03:00
committed by GitHub
parent 454438e4db
commit f0ba5ba2a2
3 changed files with 21 additions and 4 deletions

View File

@@ -89,7 +89,7 @@ class NonCallableMock(Base, Any):
def __new__(
cls,
spec: list[str] | object | type[object] | None = None,
wraps: Incomplete | None = None,
wraps: Any | None = None,
name: str | None = None,
spec_set: list[str] | object | type[object] | None = None,
parent: NonCallableMock | None = None,
@@ -104,7 +104,7 @@ class NonCallableMock(Base, Any):
def __init__(
self,
spec: list[str] | object | type[object] | None = None,
wraps: Incomplete | None = None,
wraps: Any | None = None,
name: str | None = None,
spec_set: list[str] | object | type[object] | None = None,
parent: NonCallableMock | None = None,