-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionenhancement requestNew feature or requestNew feature or request
Description
The pydantic source base includes a type alias called CoreSchema
that is defined as a union with 40+ types. This type alias is used in many parts of the code, including TypeVar bounds. When I run pyright on the pydantic code base, it takes more than 20s to complete. If I reduce the number of items in the CoreSchema
union from 40 to 5, the total type checking time drops to less than 1s. We should determine if there are ways to avoid n^2 (or worse) behaviors for common operations on unions.
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionenhancement requestNew feature or requestNew feature or request