Skip to content
Snippets Groups Projects
Unverified Commit 0615e7f9 authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub
Browse files

gh-84753: Clarify change made to `inspect` functions (GH-94554) (GH-94560)


(cherry picked from commit a2a3f2c5)

Co-authored-by: default avatarŁukasz Langa <lukasz@langa.pl>
parent e2844685
Branches
Tags
No related merge requests found
:func:`inspect.iscoroutinefunction` now properly returns ``True`` when an instance
of :class:`unittest.mock.AsyncMock` is passed to it. This makes it consistent with
:func:`inspect.iscoroutinefunction`, :func:`inspect.isgeneratorfunction`,
and :func:`inspect.isasyncgenfunction` now properly return ``True`` for
duck-typed function-like objects like instances of
:class:`unittest.mock.AsyncMock`.
This makes :func:`inspect.iscoroutinefunction` consistent with the
behavior of :func:`asyncio.iscoroutinefunction`. Patch by Mehdi ABAAKOUK.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment