-
Notifications
You must be signed in to change notification settings - Fork 105
AsyncMock stubs for mypy in Python 3.7 #500
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
Comments
Hi! I think the right way to do this would be to just add the type annotations you need upstream (ie: as a CPython PR) and then they will flow down to the backport here. If you create such a PR, feel free to link it from this issue. |
You're missing my point: there's no need for separate type stubs, please add typing information you need as a PR to the actual code upstream, so that no separate stubs are needed. (Unless I'm missing something: my understanding is that type stubs were only intended to be a stop-gap until the source code could have type annotations added to it, if you know different, please explain it to me!) Also, your link to |
Sorry, I fixed the link. What I mean is the stubs already existed and needed a small fix to solve the problem. I was wondering why the type annotations aren't already added to cpython, as it is much better for developing against. I am interested in doing that, but it will require significantly more effort and probably be a more drawn out review process to make sure nothing is broken. |
To be clear: I think shipping separate stubs is a really bad idea for any python package, and I was strongly against that part of the PEP. They will invariably get out of date and cause more problems than they solve. |
Uh oh!
There was an error while loading. Please reload this page.
Is there an equivalent to the stubs for the standard library version of mock for this package?
I am using AsyncMock in python 3.7 with this package and it works fine, but the stubs are not defined for AsyncMock in the package above, so mypy is giving errors. Is there a solution to this besides updating to 3.8+ and using unittest.mock?
The text was updated successfully, but these errors were encountered: