mirror of https://github.com/tiangolo/fastapi.git
fmt
This commit is contained in:
parent
b11f63c052
commit
168d839114
|
|
@ -281,12 +281,12 @@ else:
|
||||||
from pydantic.fields import ( # type: ignore[attr-defined]
|
from pydantic.fields import ( # type: ignore[attr-defined]
|
||||||
SHAPE_FROZENSET,
|
SHAPE_FROZENSET,
|
||||||
SHAPE_LIST,
|
SHAPE_LIST,
|
||||||
|
SHAPE_MAPPING,
|
||||||
SHAPE_SEQUENCE,
|
SHAPE_SEQUENCE,
|
||||||
SHAPE_SET,
|
SHAPE_SET,
|
||||||
SHAPE_SINGLETON,
|
SHAPE_SINGLETON,
|
||||||
SHAPE_TUPLE,
|
SHAPE_TUPLE,
|
||||||
SHAPE_TUPLE_ELLIPSIS,
|
SHAPE_TUPLE_ELLIPSIS,
|
||||||
SHAPE_MAPPING,
|
|
||||||
)
|
)
|
||||||
from pydantic.fields import FieldInfo as FieldInfo
|
from pydantic.fields import FieldInfo as FieldInfo
|
||||||
from pydantic.fields import ( # type: ignore[no-redef,attr-defined]
|
from pydantic.fields import ( # type: ignore[no-redef,attr-defined]
|
||||||
|
|
@ -425,7 +425,6 @@ else:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def is_pv1_scalar_sequence_mapping_field(field: ModelField) -> bool:
|
def is_pv1_scalar_sequence_mapping_field(field: ModelField) -> bool:
|
||||||
if (field.shape in mapping_shapes) and not lenient_issubclass(
|
if (field.shape in mapping_shapes) and not lenient_issubclass(
|
||||||
field.type_, BaseModel
|
field.type_, BaseModel
|
||||||
|
|
@ -438,7 +437,6 @@ else:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def _normalize_errors(errors: Sequence[Any]) -> List[Dict[str, Any]]:
|
def _normalize_errors(errors: Sequence[Any]) -> List[Dict[str, Any]]:
|
||||||
use_errors: List[Any] = []
|
use_errors: List[Any] = []
|
||||||
for error in errors:
|
for error in errors:
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,8 @@ from fastapi._compat import (
|
||||||
is_bytes_field,
|
is_bytes_field,
|
||||||
is_bytes_sequence_field,
|
is_bytes_sequence_field,
|
||||||
is_scalar_field,
|
is_scalar_field,
|
||||||
is_scalar_sequence_field,
|
|
||||||
is_scalar_mapping_field,
|
is_scalar_mapping_field,
|
||||||
|
is_scalar_sequence_field,
|
||||||
is_scalar_sequence_mapping_field,
|
is_scalar_sequence_mapping_field,
|
||||||
is_sequence_field,
|
is_sequence_field,
|
||||||
is_uploadfile_or_nonable_uploadfile_annotation,
|
is_uploadfile_or_nonable_uploadfile_annotation,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue