-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
stubgen fails with "TypeError: tuple object expected" running against cattr
package
#6639
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
cattr
packagecattr
package
This looks like a Most likely @msullivan knows the answer. |
Yeah it is an interaction with mypyc. Error message is bad too, so I filed mypyc/mypyc#552. I'll put up a PR right now. This is a very bad regression but also it is only stubgen so I dunno if it is worth a point release |
find_module_path_and_all_py3 promises to return __all__ as a List, but __all__ could be a tuple or something. Make sure to convert it. Fixes #6639.
find_module_path_and_all_py3 promises to return __all__ as a List, but __all__ could be a tuple or something. Make sure to convert it. Fixes #6639.
find_module_path_and_all_py3 promises to return __all__ as a List, but __all__ could be a tuple or something. Make sure to convert it. Fixes #6639.
I don't think we need a point release (unless there will be more reports of this issue). |
find_module_path_and_all_py3 promises to return __all__ as a List, but __all__ could be a tuple or something. Make sure to convert it. Fixes #6639.
find_module_path_and_all_py3 promises to return __all__ as a List, but __all__ could be a tuple or something. Make sure to convert it. Fixes #6639.
Bug
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
No code, but I'm trying to generate stubs for
cattrs
, which lives here: https://github.com/Tinche/cattrsThe command I'm using, on MyPy 0.700, is
stubgen -p cattr
. MyPy does manage to find the package. (for instance,stubgen -p cattrs
gives the expected messageFailed to import cattrs; skipping it
)I am running this inside a clean virtualenv.
I would expect the
out
directory to be created with some stubs.Python 3.7.2, MyPy 0.700
I get an entirely different error! Fascinating.
I already expected that the error might lie within cattrs itself, but obviously the 0.700 error message was not helping me at all. This is a lot more useful. I suggest that this issue be closed once 0.710 is released and still manifests this improved error behavior, and then this issue may help others who are running into similar issues on older versions of MyPy.
The text was updated successfully, but these errors were encountered: