From 5f5ad8a9f4fa129749444ab4b4957d2d0a888006 Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Fri, 7 Apr 2023 11:31:56 +0100 Subject: [PATCH] add comment --- pydantic_core/core_schema.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pydantic_core/core_schema.py b/pydantic_core/core_schema.py index 7242392f7..8066e6a0d 100644 --- a/pydantic_core/core_schema.py +++ b/pydantic_core/core_schema.py @@ -3283,9 +3283,9 @@ def definition_reference_schema( return dict_not_none(type='definition-ref', schema_ref=schema_ref, metadata=metadata, serialization=serialization) -MYPY: Literal[False] = False - - +MYPY = False +# See https://github.com/python/mypy/issues/14034 for details, in summary mypy is extremely slow to process this +# union which kills performance not just for pydantic, but even for code using pydantic if not MYPY: CoreSchema = Union[ AnySchema,