(annotation: Any)
| 161 | |
| 162 | |
| 163 | def is_uploadfile_sequence_annotation(annotation: Any) -> bool: |
| 164 | origin = get_origin(annotation) |
| 165 | if origin is Union or origin is UnionType: |
| 166 | at_least_one = False |
| 167 | for arg in get_args(annotation): |
| 168 | if is_uploadfile_sequence_annotation(arg): |
| 169 | at_least_one = True |
| 170 | continue |
| 171 | return at_least_one |
| 172 | return field_annotation_is_sequence(annotation) and all( |
| 173 | is_uploadfile_or_nonable_uploadfile_annotation(sub_annotation) |
| 174 | for sub_annotation in get_args(annotation) |
| 175 | ) |
| 176 | |
| 177 | |
| 178 | def is_pydantic_v1_model_instance(obj: Any) -> bool: |
searching dependent graphs…