MCPcopy
hub / github.com/ray-project/ray / has_async_methods

Function has_async_methods

python/ray/_private/async_compat.py:39–41  ·  view source on GitHub ↗

Return True if the class has any async methods.

(cls: object)

Source from the content-addressed store, hash-verified

37
38@lru_cache(maxsize=2**10)
39def has_async_methods(cls: object) -> bool:
40 """Return True if the class has any async methods."""
41 return len(inspect.getmembers(cls, predicate=is_async_func)) > 0
42
43
44@lru_cache(maxsize=2**10)

Callers 2

_remoteMethod · 0.90
test_has_async_methodsFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_has_async_methodsFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…