Skip to content

Spurious "Cannot inherit non-frozen dataclass from a frozen one" #14952

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

Closed
NeilGirdhar opened this issue Mar 23, 2023 · 0 comments · Fixed by #14958
Closed

Spurious "Cannot inherit non-frozen dataclass from a frozen one" #14952

NeilGirdhar opened this issue Mar 23, 2023 · 0 comments · Fixed by #14958

Comments

@NeilGirdhar
Copy link
Contributor

I'll produce a MWE when I have more time, but this is error is happening on all my projects that use dataclass_transform with frozen=True. For example, https://github.com/NeilGirdhar/tjax/

Simply clone, and run MyPy twice. Thus, it appears there's something missing from or wrongly added to the MyPy cache.

tjax/_src/fixed_point/simple_scan.py: note: In class "SimpleScan":
tjax/_src/fixed_point/simple_scan.py:15: error: Cannot inherit non-frozen dataclass from a frozen one  [misc]
    class SimpleScan(IteratedFunctionBase[Parameters, State, Trajectory, State],
...

CC @wesleywright

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

Successfully merging a pull request may close this issue.

2 participants