Skip to content
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

from typing import Type #6

Open
antvig opened this issue Nov 29, 2017 · 2 comments
Open

from typing import Type #6

antvig opened this issue Nov 29, 2017 · 2 comments

Comments

@antvig
Copy link

antvig commented Nov 29, 2017

Hi,
When importing parsyfiles, I get the following error :

    from typing import Type, Dict, Any, Set, Tuple, List
ImportError: cannot import name 'Type'

Python is picking up the standard library version of typing (which does not define 'Type') instead of the version of typing I installed through pip...

@smarie
Copy link
Owner

smarie commented Dec 4, 2017

This issue was also encountered here: smarie/python-autoclass#4
The solution is to delete the file manually.
Please let me now if this solves your issue.

@smarie
Copy link
Owner

smarie commented Feb 7, 2018

Note: another solution would be to use 'Type' everywhere in the source type hints, and to wrap the corresponding import with a try/except everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants