Skip to content

Commit

Permalink
fix typecheck error
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle committed Jan 8, 2024
1 parent fe4b809 commit b68e7e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pydantic/_internal/_fields.py
Expand Up @@ -266,7 +266,7 @@ def collect_dataclass_fields(

source_module = sys.modules.get(cls.__module__)
if source_module is not None:
types_namespace = {**source_module.__dict__, **types_namespace}
types_namespace = {**source_module.__dict__, **(types_namespace or {})}

for ann_name, dataclass_field in dataclass_fields.items():
ann_type = _typing_extra.eval_type_lenient(dataclass_field.type, types_namespace, cls_localns)
Expand Down

0 comments on commit b68e7e3

Please sign in to comment.