MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / layout

Function layout

tests/test_prepare.py:680–687  ·  view source on GitHub ↗

The identity and contents of `value` and of everything inside it.

(value: object)

Source from the content-addressed store, hash-verified

678
679
680def layout(value: object) -> object:
681 """The identity and contents of `value` and of everything inside it."""
682 contents = value
683 if is_mapping(value):
684 contents = [(key, layout(item)) for key, item in value.items()]
685 elif is_sequence(value) and not isinstance(value, str):
686 contents = [layout(item) for item in value]
687 return id(value), type(value), contents
688
689
690@pytest.mark.parametrize(

Calls 2

is_mappingFunction · 0.90
is_sequenceFunction · 0.90

Tested by

no test coverage detected