Commit graph

3 commits

Author SHA1 Message Date
makiaveli1
aafac649cb
Fix check_callable() reporting wrapped async callables as synchronous
check_callable() only inspected objects that are exactly types.FunctionType,
and otherwise looked at obj.__call__. For a bound async method or a
functools.partial wrapping an async function, __call__ is a method wrapper
rather than a coroutine function, so both were reported as synchronous even
though inspect.iscoroutinefunction() agrees they are async.

Inspect the object itself first, which covers functions, bound methods and
partial objects, and keep the __call__ check for callable instances.
2026-09-30 15:26:24 +01:00
Simon Willison
e889403d3b
Upgrade to ruff>=0.16.0 (#2857)
* ruff>=0.16.0

See https://astral.sh/blog/ruff-v0.16.0

* uv run ruff check . --fix --unsafe-fixes

* Ruff fixes by Claude Code Opus 5
2026-07-25 15:47:08 -07:00
Simon Willison
9584879534 Rename callable.py to check_callable.py, refs #2078 2023-05-25 11:49:40 -07:00
Renamed from tests/test_utils_callable.py (Browse further)