Skip to content

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

Closed

Description

@NeilGirdhar

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions