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

Method sync_fn

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

Source from the content-addressed store, hash-verified

1872
1873 def test_construction_rejects_sync_function(self) -> None:
1874 def sync_fn(request: APIRequest, call_next: CallNext) -> Any:
1875 return call_next(request)
1876
1877 with pytest.raises(TypeError, match="is not an async function"):
1878 make_async_client(middleware=[sync_fn])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected