Skip to content

Commit

Permalink
Update api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Apr 3, 2024
1 parent a2f7fe4 commit 136549e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/curies/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
from pydantic import BaseModel, Field
from pytrie import StringTrie

from ._pydantic_compat import field_validator, get_field_validator_values, PYDANTIC_V1
from ._pydantic_compat import PYDANTIC_V1, field_validator, get_field_validator_values

if not PYDANTIC_V1:
from pydantic import ConfigDict

Expand Down Expand Up @@ -204,13 +205,15 @@ class notion of parsed reference (instead of merely stringified
)

if PYDANTIC_V1:

class Config:
"""Pydantic configuration for references."""

frozen = True

else:
model_config = ConfigDict(frozen=True)


@property
def curie(self) -> str:
"""Get the reference as a CURIE string.
Expand Down

0 comments on commit 136549e

Please sign in to comment.