You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Found 1 source file
/..../test/test.py
/..../test/test.py:9:16 - error: Argument type is partially unknown
Argument corresponds to parameter "coro" in function "wrap"
Argument type is "Coroutine[Any, Any, Unknown]" (reportUnknownArgumentType)
1 error, 0 warnings, 0 informations
Closes#7866. This adds an overload to `asyncio.sleep()`, so that when it is called _without_ `return=None`, the type checker knows that the return type is `None` instead of `unknown`.
Also related to microsoft/pyright#3475.
This is from microsoft/pyright#3475.
With the latest version of pyright (1.1.247), this code results in an error:
The result when I run
pyright
on it:The fix, as suggested by @JelleZijlstra and @erictraut, is to add an overload like this:
The text was updated successfully, but these errors were encountered: