Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@mock.patch produces invalid signature #4591

Closed
JukkaL opened this issue Oct 1, 2020 · 0 comments · Fixed by #4592
Closed

@mock.patch produces invalid signature #4591

JukkaL opened this issue Oct 1, 2020 · 0 comments · Fixed by #4592

Comments

@JukkaL
Copy link
Contributor

JukkaL commented Oct 1, 2020

This code doesn't type check, even though it works at runtime:

from mock import patch

@patch('builtins.ord')
def f(mock) -> None:
    print(mock)

f()  # Too few arguments for "f" (mypy error)
srittau added a commit to srittau/typeshed that referenced this issue Oct 1, 2020
srittau added a commit that referenced this issue Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant