diff --git a/python/pydantic_core/core_schema.py b/python/pydantic_core/core_schema.py index d03dded87..957ec85da 100644 --- a/python/pydantic_core/core_schema.py +++ b/python/pydantic_core/core_schema.py @@ -145,7 +145,7 @@ def context(self) -> ContextT: ... @property - def mode(self) -> Literal['python', 'json']: + def mode(self) -> Literal['python', 'json'] | str: """The serialization mode set during serialization.""" ...