mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 21:14:48 +08:00
Noticed this in mypy-primer output in #5516 on this code: https://github.com/encode/starlette/blob/master/starlette/testclient.py#L74 It calls `iscoroutinefunction()` on an object that may be None, which got flagged as an error but is actually fine; it just returns False. We could also potentially use TypeGuard here, especially for `iscoroutine` which is just an `isinstance` call.