fixed python 3.7 "TypeError: 'type' object is not subscriptable"

This commit is contained in:
Tim Riddermann 2023-05-09 11:31:18 +02:00
parent 3a676478ee
commit d969fab1d3

View file

@ -27,7 +27,7 @@ class DataclassMixin:
methods exists and every name can be used.
"""
__dataclass_fields__: t.ClassVar[dict[str, dataclasses.Field[t.Any]]]
__dataclass_fields__: "t.ClassVar[dict[str, dataclasses.Field[t.Any]]]"
def __getitem__(self, key: str) -> t.Any:
return getattr(self, key)