Shoobx / mypy-zope

Plugin for mypy to support zope.interface
MIT License
38 stars 11 forks source link

Potential issue with mypy==0.970-dev #74

Closed arnimarj closed 2 years ago

arnimarj commented 2 years ago

I was experimenting with the latest dev release of mypy 0.970 and hit this error:

Traceback (most recent call last):
  File "mypy/semanal.py", line 5350, in accept
  File "mypy/nodes.py", line 1029, in accept
  File "mypy/semanal.py", line 1123, in visit_class_def
  File "mypy/semanal.py", line 1203, in analyze_class
  File "mypy/semanal.py", line 1212, in analyze_class_body_common
  File "mypy/semanal.py", line 1243, in apply_class_plugin_hooks
  File "/home/arni/.config/dohop/tools_venv3/lib/python3.10/site-packages/mypy_zope/plugin.py", line 301, in analyze
    apply_implementer(iface_arg, classdef_ctx.cls.info, api)
  File "/home/arni/.config/dohop/tools_venv3/lib/python3.10/site-packages/mypy_zope/plugin.py", line 293, in apply_implementer
    self._apply_interface(class_info, iface_type)
  File "/home/arni/.config/dohop/tools_venv3/lib/python3.10/site-packages/mypy_zope/plugin.py", line 700, in _apply_interface
    faketi._promote = promote
TypeError: list object expected; got mypy.types.Instance
kedder commented 2 years ago

Thanks for testing @arnimarj. #75 should fix it. Will merge it when 0.970 will be released.