MCPcopy
hub / github.com/fastapi/fastapi / field_annotation_is_sequence

Function field_annotation_is_sequence

fastapi/_compat/shared.py:64–73  ·  view source on GitHub ↗
(annotation: type[Any] | None)

Source from the content-addressed store, hash-verified

62
63
64def 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
76def value_is_sequence(value: Any) -> bool:

Calls 1

_annotation_is_sequenceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…