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

Method get

tests/lib/tools/toolsets/test_interface.py:163–164  ·  view source on GitHub ↗
(self, key: str, default: object = None)

Source from the content-addressed store, hash-verified

161 class Shifty(dict[str, object]):
162 @override
163 def get(self, key: str, default: object = None) -> object:
164 return False if key == "enabled" else super().get(key, default)
165
166 shifty = TwoMembers(configs=cast(Any, {"navigate": Shifty(enabled="no")}))
167 assert cast(Any, shifty.to_dict())["configs"]["navigate"] == {"enabled": "no"} # what the API is told (and rejects)

Calls

no outgoing calls

Tested by

no test coverage detected