-
Notifications
You must be signed in to change notification settings - Fork 0
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
pytest_mock MockFixture does not accept mock_open #1
Comments
These stubs are very incomplete. There are more complete stubs now in typeshed HEAD (and will be in the next mypy release). Unfortunately there is a problem with |
This one right? https://github.com/python/typeshed/blob/master/third_party/3/pytest_mock/plugin.pyi With this stub I don't have the mock_open error, but I still have the first one: |
@staticdev Yeah, as said above, it's still problematic. But please try the updated version in this repository. It won't work with pytype, due to the bug mentioned above, but it should work with mypy. |
@srittau I tested with your latest commit, now the error changed:
Maybe this one is related to python/mypy#6910 |
If I call
patch
with just the target the stub works, but if I put the arg mock_open I get mypy errors:Mypy errors:
You can see full example in this PR: staticdev/toml-validator#110
The text was updated successfully, but these errors were encountered: