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

Function nested

tests/test_prepare.py:730–734  ·  view source on GitHub ↗
(depth: int)

Source from the content-addressed store, hash-verified

728
729 # untyped JSON fields (`input_schema`, ...) can nest past the recursion limit
730 def nested(depth: int) -> object:
731 data: object = {"type": "base64", "dropped": omit, "data": SAMPLE_FILE_PATH}
732 for i in range(depth):
733 data = {"k": data} if i % 2 else (data,)
734 return data
735
736 depth = 5 * sys.getrecursionlimit()
737 if isinstance(client, Anthropic):

Callers 1

test_deep_nestingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected