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

mypy plugin fails on Immutable class with Immutable members #22

Closed
suned opened this issue Nov 8, 2019 · 1 comment
Closed

mypy plugin fails on Immutable class with Immutable members #22

suned opened this issue Nov 8, 2019 · 1 comment
Labels
bug Something isn't working MyPy

Comments

@suned
Copy link
Owner

suned commented Nov 8, 2019

from pfun import Immutable

class C(Immutable):
    pass

class B(Immutable):
    c: C

error:

Traceback (most recent call last):
  File "mypy/semanal.py", line 4626, in accept
  File "mypy/nodes.py", line 927, in accept
  File "mypy/semanal.py", line 1022, in visit_class_def
  File "mypy/semanal.py", line 1093, in analyze_class
  File "mypy/semanal.py", line 1102, in analyze_class_body_common
  File "mypy/semanal.py", line 1162, in apply_class_plugin_hooks
  File "/Users/sune/pfun/pfun/mypy_plugin.py", line 207, in _immutable_hook
    transformer.transform()
  File "mypy/plugins/dataclasses.py", line 90, in transform
  File "mypy/semanal.py", line 4360, in defer
AssertionError: Must not defer during final iteration
@suned suned added bug Something isn't working MyPy labels Nov 8, 2019
@suned
Copy link
Owner Author

suned commented Aug 4, 2020

Fixed with mypy 0.782

@suned suned closed this as completed Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working MyPy
Projects
None yet
Development

No branches or pull requests

1 participant