Skip to content

Commit a2a3f2c

Browse files
authored
gh-84753: Clarify change made to inspect functions (#94554)
1 parent 92bcb26 commit a2a3f2c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
:func:`inspect.iscoroutinefunction` now properly returns ``True`` when an instance
2-
of :class:`unittest.mock.AsyncMock` is passed to it. This makes it consistent with
1+
:func:`inspect.iscoroutinefunction`, :func:`inspect.isgeneratorfunction`,
2+
and :func:`inspect.isasyncgenfunction` now properly return ``True`` for
3+
duck-typed function-like objects like instances of
4+
:class:`unittest.mock.AsyncMock`.
5+
6+
This makes :func:`inspect.iscoroutinefunction` consistent with the
37
behavior of :func:`asyncio.iscoroutinefunction`. Patch by Mehdi ABAAKOUK.

0 commit comments

Comments
 (0)