Skip to content

Commit

Permalink
Fix type parameter in load_dataclass.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 458306262
  • Loading branch information
timblakely authored and Copybara-Service committed Jun 30, 2022
1 parent 2230cbf commit 2948a58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion connectomics/common/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def load_dataclass(constructor: T, v: Union[str, dict[str, Any], T, None]) -> T:
Returns:
New dataclass instance.
"""
if isinstance(v, type(T)) or v is None:
if isinstance(v, type(constructor)) or v is None:
return v
elif isinstance(v, str):
try:
Expand Down

0 comments on commit 2948a58

Please sign in to comment.