Skip to content

Commit ff93f1a

Browse files
committed
fix 3.9 test with union syntax
1 parent 6efdfc9 commit ff93f1a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_prebuilt.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Union
2+
13
from pydantic_core import SchemaSerializer, SchemaValidator, core_schema
24

35

@@ -55,7 +57,7 @@ class InnerModel:
5557
def __init__(self, x: str) -> None:
5658
self.x = x
5759

58-
def serialize_inner(v: InnerModel, serializer) -> dict[str, str] | str:
60+
def serialize_inner(v: InnerModel, serializer) -> Union[dict[str, str], str]:
5961
v.x = v.x + ' modified'
6062
return serializer(v)
6163

0 commit comments

Comments
 (0)