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

Function get_caller_name

tests/lib/utils.py:50–58  ·  view source on GitHub ↗
(*, stacklevel: int = 1)

Source from the content-addressed store, hash-verified

48
49
50def get_caller_name(*, stacklevel: int = 1) -> str:
51 frame = inspect.currentframe()
52 assert frame is not None
53
54 for i in range(stacklevel):
55 frame = frame.f_back
56 assert frame is not None, f"no {i}th frame"
57
58 return frame.f_code.co_name
59
60
61def clear_locals(string: str, *, stacklevel: int) -> str:

Callers 1

clear_localsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected