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

Method sync_fn

tests/test_middleware.py:2134–2135  ·  view source on GitHub ↗
(request: APIRequest, call_next: CallNext)

Source from the content-addressed store, hash-verified

2132
2133 def test_construction_rejects_sync_function(self) -> None:
2134 def sync_fn(request: APIRequest, call_next: CallNext) -> Any:
2135 return call_next(request)
2136
2137 with pytest.raises(TypeError, match="is not an async function"):
2138 make_async_client(middleware=[sync_fn])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected