Skip to content

Commit

Permalink
Fix new_callable overload
Browse files Browse the repository at this point in the history
  • Loading branch information
srittau committed Aug 24, 2020
1 parent 606e197 commit 194daa2
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/pytest_mock/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,20 @@ def __call__(
) -> _T:
...

@overload
def __call__(
self,
target: str,
new: None,
spec: Optional[builtins.object],
create: bool,
spec_set: Optional[builtins.object],
autospec: Optional[builtins.object],
new_callable: Callable[[], _T],
**kwargs: Any
) -> _T:
...

@overload
def __call__(
self,
Expand All @@ -295,7 +309,8 @@ def __call__(
create: bool = ...,
spec_set: Optional[builtins.object] = ...,
autospec: Optional[builtins.object] = ...,
new_callable: Callable[[], _T] = ...,
*,
new_callable: Callable[[], _T],
**kwargs: Any
) -> _T:
...
Expand Down

0 comments on commit 194daa2

Please sign in to comment.