8000 Using cached internal import for `BaseModel` by sydney-runkle · Pull Request #10013 · pydantic/pydantic · GitHub
[go: up one dir, main page]

Skip to content
Prev Previous commit
Next Next commit
remove unnecessary local import in hot loop
  • Loading branch information
sydney-runkle committed Aug 1, 2024
commit 7efc506d59ca66b1e058ee6aedbb51dcb94b1024
4 changes: 1 addition & 3 deletions pydantic/_internal/_generate_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
)
from typing_extensions import Annotated, Literal, TypeAliasType, TypedDict, get_args, get_origin, is_typeddict

from ..aliases import AliasGenerator
from ..aliases import AliasChoices, AliasGenerator, AliasPath
from ..annotated_handlers import GetCoreSchemaHandler, GetJsonSchemaHandler
from ..config import ConfigDict, JsonDict, JsonEncoder
from ..errors import PydanticSchemaGenerationError, PydanticUndefinedAnnotation, PydanticUserError
Expand Down Expand Up @@ -1254,8 +1254,6 @@ def _common_field_schema( # C901
self, name: str, field_info: FieldInfo, decorators: DecoratorInfos
) -> _CommonField:
# Update FieldInfo annotation if appropriate:
from .. import AliasChoices, AliasPath

FieldInfo = import_cached_field_info()

if has_instance_in_type(field_info.annotation, (ForwardRef, str)):
Expand Down
0