From 446f5854304593df48d94d597948494179641780 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 10:54:21 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20[pre-commit.ci]=20Auto=20format?= =?UTF-8?q?=20from=20pre-commit.com=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/_compat.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/fastapi/_compat.py b/fastapi/_compat.py index df7541316..a2eeee91a 100644 --- a/fastapi/_compat.py +++ b/fastapi/_compat.py @@ -624,7 +624,11 @@ def is_uploadfile_sequence_annotation(annotation: Any) -> bool: continue return at_least_one args = get_args(annotation) - return field_annotation_is_sequence(annotation) and args and all( - is_uploadfile_or_nonable_uploadfile_annotation(sub_annotation) - for sub_annotation in args + return ( + field_annotation_is_sequence(annotation) + and args + and all( + is_uploadfile_or_nonable_uploadfile_annotation(sub_annotation) + for sub_annotation in args + ) )