Skip to content

Fix stubgen mypyc type mismatch #6642

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

Merged
merged 1 commit into from
Apr 6, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion mypy/stubutil.py
Original file line number Diff line number Diff line change
@@ -129,7 +129,10 @@ def find_module_path_and_all_py3(module: str) -> Optional[Tuple[str, Optional[Li
raise CantImport(module)
if is_c_module(mod):
return None
return mod.__file__, getattr(mod, '__all__', None)
module_all = getattr(mod, '__all__', None)
if module_all is not None:
module_all = list(module_all)
return mod.__file__, module_all


@contextmanager