Skip to content

Compat with Mypy 1.2.0 #2691

Description

@g-as

In python/mypy#14878, a new argument was added to DataclassAttribute (is_neither_frozen_nor_nonfrozen).

  File "/home/backend/.venv/lib/python3.10/site-packages/mypy/semanal.py", line 1743, in apply_class_plugin_hooks
    hook(ClassDefContext(defn, decorator, self))
  File "/home/backend/.venv/lib/python3.10/site-packages/strawberry/ext/mypy_plugin.py", line 878, in custom_dataclass_class_maker_callback
    transformer.transform()
  File "/home/backend/.venv/lib/python3.10/site-packages/strawberry/ext/mypy_plugin.py", line 564, in transform
    attributes = self.collect_attributes()
  File "/home/backend/.venv/lib/python3.10/site-packages/strawberry/ext/mypy_plugin.py", line 792, in collect_attributes
    attribute = DataclassAttribute(**params)
TypeError: DataclassAttribute.__init__() missing 1 required positional argument: 'is_neither_frozen_nor_nonfrozen'

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions