Closed jabdoa2 closed 6 years ago
Ideally you should upgrade to Python 3.5.2, which IIRC does have Text in typing.py.
Alternatively, Text is defined in typing_extensions, which you can install via pip install. Maybe you can submit a PR with a fix? (It's not easy for me to test since I don't have such an environment any more.)
This should now be fixed as of #32. (There's no release for that yet, I'm waiting to accumulate more fixes.)
Closing since it's fixed in master.
On Ubuntu 16.04 LTS pyannotate breaks when using Python 3.5 because is ships with a limited typing stub. Upgrading typing via pip does not help since the built-in takes precedence (know issue).
Can this be fixed? Maybe "hide" the typing import behind an
if True
?This works as a workaround:
PYTHONPATH=/usr/local/lib/python3.5/dist-packages/ pyannotate