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

Method async_fn

tests/test_middleware.py:1339–1340  ·  view source on GitHub ↗
(request: APIRequest, call_next: AsyncCallNext)

Source from the content-addressed store, hash-verified

1337
1338 def test_construction_rejects_async_function(self) -> None:
1339 async def async_fn(request: APIRequest, call_next: AsyncCallNext) -> Any:
1340 return await call_next(request)
1341
1342 with pytest.raises(TypeError, match="is an async function"):
1343 make_sync_client(middleware=[async_fn])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected