MCPcopy Create free account
hub / github.com/python-hyper/uritemplate / is_list_of_tuples

Function is_list_of_tuples

uritemplate/variable.py:534–544  ·  view source on GitHub ↗
(
    value: t.Any,
)

Source from the content-addressed store, hash-verified

532
533
534def is_list_of_tuples(
535 value: t.Any,
536) -> t.Tuple[bool, t.Optional[t.Sequence[t.Tuple[str, ScalarVariableValue]]]]:
537 if (
538 not value
539 or not isinstance(value, (list, tuple))
540 or not all(isinstance(t, tuple) and len(t) == 2 for t in value)
541 ):
542 return False, None
543
544 return True, value
545
546
547def list_test(value: t.Any) -> bool:

Callers 4

_query_expansionMethod · 0.85
_label_path_expansionMethod · 0.85
_semi_path_expansionMethod · 0.85
_string_expansionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…