Skip to content

Commit 2c4c002

Browse files
ConchylicultorThe dataclass_array Authors
authored andcommitted
Fix 'type' object is not subscriptable error
PiperOrigin-RevId: 483363824
1 parent fa783ef commit 2c4c002

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ To release a new version (e.g. from `1.0.0` -> `2.0.0`):
2323

2424
## [Unreleased]
2525

26+
* Fixed: Compatibility with `edc.dataclass(auto_cast=True)` (fix the `'type'
27+
object is not subscriptable` error)
28+
2629
## [1.2.0] - 2022-10-17
2730

2831
* Changed: By default, dataclass_array do not cast and broadcast inputs

dataclass_array/array_dataclass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ class _ArrayFieldMetadata:
820820
"""
821821

822822
inner_shape_non_static: DynamicShape
823-
dtype: Union[array_types.dtypes.DType, type[DataclassArray]]
823+
dtype: Union[array_types.dtypes.DType, Type[DataclassArray]]
824824

825825
def __post_init__(self):
826826
"""Normalizing/validating the shape/dtype."""

0 commit comments

Comments
 (0)