mirror of https://github.com/tiangolo/fastapi.git
🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
This commit is contained in:
parent
cb1c40a9d2
commit
4b6a363526
|
|
@ -613,6 +613,7 @@ def is_bytes_sequence_annotation(annotation: Any) -> bool:
|
||||||
for sub_annotation in get_args(annotation)
|
for sub_annotation in get_args(annotation)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def is_uploadfile_sequence_annotation(annotation: Any) -> bool:
|
def is_uploadfile_sequence_annotation(annotation: Any) -> bool:
|
||||||
origin = get_origin(annotation)
|
origin = get_origin(annotation)
|
||||||
if origin is Union or origin is UnionType:
|
if origin is Union or origin is UnionType:
|
||||||
|
|
@ -623,7 +624,11 @@ def is_uploadfile_sequence_annotation(annotation: Any) -> bool:
|
||||||
continue
|
continue
|
||||||
return at_least_one
|
return at_least_one
|
||||||
args = get_args(annotation)
|
args = get_args(annotation)
|
||||||
return field_annotation_is_sequence(annotation) and bool(args) and all(
|
return (
|
||||||
is_uploadfile_or_nonable_uploadfile_annotation(sub_annotation)
|
field_annotation_is_sequence(annotation)
|
||||||
for sub_annotation in args
|
and bool(args)
|
||||||
|
and all(
|
||||||
|
is_uploadfile_or_nonable_uploadfile_annotation(sub_annotation)
|
||||||
|
for sub_annotation in args
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue