(annotation: type[Any] | None)
| 62 | |
| 63 | |
| 64 | def field_annotation_is_sequence(annotation: type[Any] | None) -> bool: |
| 65 | origin = get_origin(annotation) |
| 66 | if origin is Union or origin is UnionType: |
| 67 | for arg in get_args(annotation): |
| 68 | if field_annotation_is_sequence(arg): |
| 69 | return True |
| 70 | return False |
| 71 | return _annotation_is_sequence(annotation) or _annotation_is_sequence( |
| 72 | get_origin(annotation) |
| 73 | ) |
| 74 | |
| 75 | |
| 76 | def value_is_sequence(value: Any) -> bool: |
no test coverage detected
searching dependent graphs…