Skip to content

Commit f9fc4ad

Browse files
authored
fix(core): Skip dataclass fields only when it starts with _mlc_ (#53)
Should fix #52
1 parent a99fbbc commit f9fc4ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/mlc/dataclasses/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def _get_num_bytes(field_ty: Any) -> int:
151151
)
152152
)
153153
for field_name, field_ty_py in type_hints.items():
154-
if field_name.startswith("_"):
154+
if field_name.startswith("_mlc_"):
155155
continue
156156
field_ty = mlc_typing.from_py(field_ty_py)
157157
type_fields.append(

0 commit comments

Comments
 (0)