Browse Source

Fix typing issue

pull/15069/head
Yurii Motov 3 months ago
parent
commit
6aa2f98504
  1. 4
      fastapi/params.py

4
fastapi/params.py

@ -2,7 +2,7 @@ import warnings
from collections.abc import Callable, Sequence from collections.abc import Callable, Sequence
from dataclasses import dataclass from dataclasses import dataclass
from enum import Enum from enum import Enum
from typing import Annotated, Any, Literal from typing import Annotated, Any, Literal, cast
from fastapi.exceptions import FastAPIDeprecationWarning from fastapi.exceptions import FastAPIDeprecationWarning
from fastapi.openapi.models import Example from fastapi.openapi.models import Example
@ -668,7 +668,7 @@ class _FileUploadMarker:
def __get_pydantic_core_schema__( def __get_pydantic_core_schema__(
cls, source: type[Any], handler: Any cls, source: type[Any], handler: Any
) -> dict[str, Any]: ) -> dict[str, Any]:
schema = handler(source) schema = cast(dict[str, Any], handler(source))
# Find the inner type schema (if nullable or list) # Find the inner type schema (if nullable or list)
inner_type_schema = schema inner_type_schema = schema

Loading…
Cancel
Save