seandstewart / typical

Typical: Fast, simple, & correct data-validation using Python 3 typing.
https://python-typical.org
MIT License
183 stars 9 forks source link

When using my with typic.mypy plugin get error cannot import name 'TypingType' from 'mypy.typeops' #208

Closed ErnestoLoma closed 4 days ago

ErnestoLoma commented 1 year ago

Description

When using mypy with typic.mypy configured in mypy.ini I get the following error: mypy.ini:2: error: Error importing plugin "typic.mypy": cannot import name 'TypingType' from 'mypy.typeops' (/Users/ernesthill/PycharmProjects/Typical/venv/lib/python3.9/site-packages/mypy/typeops.cpython-39-darwin.so) [misc] Found 1 error in 1 file (errors prevented further checking)

What I Did

ran mypy for my project. The version of mypy is 1.5.1

Paste the command(s) you ran and the output. If there was a crash, please include the traceback here. mypy pyatlan mypy.ini:2: error: Error importing plugin "typic.mypy": cannot import name 'TypingType' from 'mypy.typeops' (/Users/ernesthill/PycharmProjects/Typical/venv/lib/python3.9/site-packages/mypy/typeops.cpython-39-darwin.so) [misc] Found 1 error in 1 file (errors prevented further checking)

kyle-kc commented 1 year ago

Same problem here. I can't find the TypingType class in mypy.typeops so I'm guessing it was removed from mypy at some point.

seandstewart commented 11 months ago

Yes, the plugin does not work with newer versions of mypy - however if you don't use the @typic.klass decorator, there is largely no need for the plugin.