(annotation: Any)
| 146 | |
| 147 | |
| 148 | def 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 | |
| 163 | def is_uploadfile_sequence_annotation(annotation: Any) -> bool: |
searching dependent graphs…