mock: Fix unconstrained TypeVar (#7945)

The first overload covers the case where `new` is not given.

Part of #7928
This commit is contained in:
Jelle Zijlstra
2022-05-24 22:52:40 -07:00
committed by GitHub
parent 070e6c2a2d
commit 796a689fc1

View File

@@ -230,7 +230,7 @@ class _patcher:
self,
target: Any,
attribute: str,
new: _T = ...,
new: _T,
spec: Any | None = ...,
create: bool = ...,
spec_set: Any | None = ...,