Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Feb 4, 2024
1 parent d965751 commit 7e18dd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/curies/_pydantic_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
from pydantic import field_validator


def get_field_validator_values(values, key: str):
def get_field_validator_values(values, key: str): # type:ignore
"""Get the value for the key from a field validator object, cross-compatible with Pydantic 1 and 2."""
if PYDANTIC_V1:
return values[key]
else:
return values.data[key] # type:ignore
return values.data[key]
2 changes: 1 addition & 1 deletion src/curies/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from pydantic import BaseModel, Field
from pytrie import StringTrie

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

if TYPE_CHECKING: # pragma: no cover
import pandas
Expand Down

0 comments on commit 7e18dd5

Please sign in to comment.