diff --git a/fastapi/dependencies/models.py b/fastapi/dependencies/models.py index 65ef1aad6..725559a56 100644 --- a/fastapi/dependencies/models.py +++ b/fastapi/dependencies/models.py @@ -7,11 +7,11 @@ from typing import Any, Callable, List, Optional, Sequence, Tuple, Union, cast from fastapi._compat import ModelField from fastapi.security.base import SecurityBase from fastapi.types import ( + DependencyScope, EndpointDependencyCacheKey, + EndpointDependencyScope, LifespanDependencyCacheKey, - DependencyScope, LifespanDependencyScope, - EndpointDependencyScope, ) from typing_extensions import TypeAlias diff --git a/fastapi/params.py b/fastapi/params.py index 0f19122e3..4cbee3c7c 100644 --- a/fastapi/params.py +++ b/fastapi/params.py @@ -5,7 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, Sequence, Union from fastapi.openapi.models import Example from pydantic.fields import FieldInfo -from typing_extensions import Annotated, Literal, TypeAlias, deprecated +from typing_extensions import Annotated, deprecated from ._compat import ( PYDANTIC_V2, @@ -13,7 +13,7 @@ from ._compat import ( Undefined, ) from .exceptions import InvalidDependencyScope -from .types import EndpointDependencyScope, DependencyScope +from .types import DependencyScope, EndpointDependencyScope _Unset: Any = Undefined diff --git a/fastapi/utils.py b/fastapi/utils.py index fbaaeb6ae..6d7d4944d 100644 --- a/fastapi/utils.py +++ b/fastapi/utils.py @@ -6,16 +6,16 @@ from dataclasses import is_dataclass from typing import ( TYPE_CHECKING, Any, + Awaitable, + Callable, Dict, MutableMapping, Optional, Set, Type, + TypeVar, Union, cast, - Awaitable, - TypeVar, - Callable, ) from weakref import WeakKeyDictionary