Skip to content

Commit

Permalink
[MAINTENANCE] remove deprecated usage of pydantic Extra
Browse files Browse the repository at this point in the history
  • Loading branch information
TrangPham committed Oct 30, 2023
1 parent ebd0519 commit f255234
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import uuid
from typing import TYPE_CHECKING, Any, Dict, TypeVar

from great_expectations.compatibility.pydantic import BaseModel, Extra
from great_expectations.compatibility.pydantic import BaseModel
from great_expectations.compatibility.typing_extensions import override
from great_expectations.core.http import create_session
from great_expectations.experimental.metric_repository.data_store import DataStore
Expand All @@ -25,7 +25,7 @@ class PayloadData(BaseModel):
attributes: Dict[str, Any]

class Config:
extra = Extra.forbid
extra = "forbid"


def orjson_dumps(v, *, default):
Expand All @@ -49,7 +49,7 @@ class Payload(BaseModel):
data: PayloadData

class Config:
extra = Extra.forbid
extra = "forbid"
json_dumps = orjson_dumps
json_loads = orjson_loads

Expand Down
3 changes: 1 addition & 2 deletions great_expectations/experimental/metric_repository/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
Union,
)

from great_expectations.compatibility import pydantic
from great_expectations.compatibility.pydantic import BaseModel, Field
from great_expectations.compatibility.typing_extensions import override

Expand All @@ -28,7 +27,7 @@ class MetricRepositoryBaseModel(BaseModel):
"""Base class for all MetricRepository related models."""

class Config:
extra = pydantic.Extra.forbid
extra = "forbid"


class MetricException(MetricRepositoryBaseModel):
Expand Down

0 comments on commit f255234

Please sign in to comment.