Skip to content

Commit

Permalink
Use ConfigDict to configure pydantic dataclass
Browse files Browse the repository at this point in the history
This is the pydantic v2 interface.
  • Loading branch information
timj committed Jan 4, 2024
1 parent be7a6ee commit e6dbd61
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions python/lsst/pipe/tasks/fit_multiband.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
__all__ = ["CatalogExposure", "CatalogExposureConfig", ]

from functools import cached_property
from pydantic import Field
from pydantic import Field, ConfigDict
from pydantic.dataclasses import dataclass

import lsst.afw.image as afwImage
import lsst.afw.table as afwTable
import lsst.daf.butler as dafButler


class CatalogExposureConfig:
arbitrary_types_allowed = True
CatalogExposureConfig = ConfigDict(arbitrary_types_allowed=True)


@dataclass(frozen=True, kw_only=True, config=CatalogExposureConfig)
Expand Down

0 comments on commit e6dbd61

Please sign in to comment.