MCPcopy Index your code
hub / github.com/fastapi/fastapi / is_bytes_sequence_annotation

Function is_bytes_sequence_annotation

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

Source from the content-addressed store, hash-verified

146
147
148def is_bytes_sequence_annotation(annotation: Any) -> bool:
149 origin = get_origin(annotation)
150 if origin is Union or origin is UnionType:
151 at_least_one = False
152 for arg in get_args(annotation):
153 if is_bytes_sequence_annotation(arg):
154 at_least_one = True
155 continue
156 return at_least_one
157 return field_annotation_is_sequence(annotation) and all(
158 is_bytes_or_nonable_bytes_annotation(sub_annotation)
159 for sub_annotation in get_args(annotation)
160 )
161
162
163def is_uploadfile_sequence_annotation(annotation: Any) -> bool:

Callers 2

_extract_form_bodyFunction · 0.90

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…