fixed python 3.7 "TypeError: 'type' object is not subscriptable"
This commit is contained in:
parent
3a676478ee
commit
d969fab1d3
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue