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

Method sync_fn

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected