Skip to content

Allow the use of types.ModuleType #3106

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

Closed
pkch opened this issue Apr 2, 2017 · 3 comments
Closed

Allow the use of types.ModuleType #3106

pkch opened this issue Apr 2, 2017 · 3 comments

Comments

@pkch
Copy link
Contributor

pkch commented Apr 2, 2017

Based on this SO question, I tried this code:

import types
def f() -> types.ModuleType:
    return types

and it failed type check with Incompatible return value type (got "module", expected "ModuleType"). I think names exported in types.* are appropriate for cases like this?

@ilevkivskyi
Copy link
Member

I think this is just a duplicate of #1498

@ilevkivskyi
Copy link
Member

I am closing this now, I also updated the description of your PR to mention the existing #1498

@pkch
Copy link
Contributor Author

pkch commented Apr 2, 2017

Yup it is... I hope only the issue is a duplicate, not my PR 😆

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

No branches or pull requests

2 participants