We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bec3052 commit 56cfb40Copy full SHA for 56cfb40
arraycontext/container/dataclass.py
@@ -48,6 +48,8 @@ def dataclass_array_container(cls: type) -> type:
48
"""
49
from dataclasses import is_dataclass
50
assert is_dataclass(cls)
51
+ assert all(not isinstance(f.type, str) for f in fields(cls)), \
52
+ "dataclass cannot have string-based type annotations"
53
54
array_fields = [
55
f for f in fields(cls) if is_array_container_type(f.type)]
0 commit comments