Skip to content

Commit

Permalink
Fix mypy error with pydantic v1
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Aug 18, 2023
1 parent c4ea05c commit c26b00b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/tests/_examplePythonTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def from_metrics(cls, metrics: MetricsExample) -> MetricsExampleModel:
d = metrics.exportAsDict()
# Assume pydantic v2 but fallback to v1
try:
return cls.model_validate(d)
return cls.model_validate(d) # type: ignore
except AttributeError:
return cls.parse_obj(d)

Expand Down

0 comments on commit c26b00b

Please sign in to comment.