Skip to content

Commit c38a68d

Browse files
Add serialization key to InvalidSchema (#1482)
1 parent bbd4de5 commit c38a68d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

python/pydantic_core/core_schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,9 @@ class InvalidSchema(TypedDict, total=False):
439439
type: Required[Literal['invalid']]
440440
ref: str
441441
metadata: Dict[str, Any]
442+
# note, we never plan to use this, but include it for type checking purposes to match
443+
# all other CoreSchema union members
444+
serialization: SerSchema
442445

443446

444447
def invalid_schema(ref: str | None = None, metadata: Dict[str, Any] | None = None) -> InvalidSchema:

0 commit comments

Comments
 (0)