Skip to content

Commit

Permalink
Fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mike8699 committed Feb 19, 2024
1 parent 8673b20 commit cd9763f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ph_rando/shuffler/aux_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pathlib import Path
from typing import TYPE_CHECKING, Annotated, Literal, TypeAlias, Union

from pydantic import BaseModel, Field, field_validator
from pydantic import BaseModel, ConfigDict, Field, field_validator

if TYPE_CHECKING:
from ph_rando.shuffler._shuffler import Node
Expand Down Expand Up @@ -188,8 +188,7 @@ def validate_enemy_name(cls, v: str) -> str:


class Room(BaseModel):
class Config:
extra = 'allow'
model_config = ConfigDict(extra='allow')

name: str = Field(..., description='The name of the room', min_length=1)
chests: list[Annotated[Check, Field(discriminator='type')]] = Field(
Expand Down

0 comments on commit cd9763f

Please sign in to comment.