MCPcopy
hub / github.com/fastapi/fastapi / is_uploadfile_sequence_annotation

Function is_uploadfile_sequence_annotation

fastapi/_compat/shared.py:163–175  ·  view source on GitHub ↗
(annotation: Any)

Source from the content-addressed store, hash-verified

161
162
163def 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
178def is_pydantic_v1_model_instance(obj: Any) -> bool:

Callers 2

analyze_paramFunction · 0.90

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…