Skip to content

Commit 0e0d167

Browse files
committed
fixup! FIX/ENH/CLN: simplified CheckedSession code and avoid using pydantic private API (closes #1151)
1 parent b42d22e commit 0e0d167

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

larray/core/checked.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,10 @@ def _check_key_value(self, name: str,
392392
# validate more than just the value type. I wonder
393393
# if the type isn't available as-is somewhere in
394394
# the field_info structure...
395-
field_type = Annotated[field_type, *field_info.metadata]
395+
# TODO: use Annotated[field_type, *field_info.metadata] when
396+
# we drop support for Python < 3.11
397+
type_info = (field_type, *field_info.metadata)
398+
field_type = Annotated[type_info]
396399

397400
# see https://docs.pydantic.dev/2.12/concepts/types/#custom-types
398401
# for more details about TypeAdapter

0 commit comments

Comments
 (0)