Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flax/linen/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def _customized_dataclass_transform(cls):
if ('parent' in annotations
and annotations['parent'] != parent_annotation):
raise errors.ReservedModuleAttributeError(annotations)
if 'name' in annotations and annotations['name'] != str:
if 'name' in annotations and annotations['name'] not in ('str', str):
raise errors.ReservedModuleAttributeError(annotations)
# Add `parent` and `name` default fields at end.
# We temporarily modify base class __dataclass_fields__ to force desired
Expand Down