-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
stubs: improvementImprove/refactor existing annotations, other stubs issuesImprove/refactor existing annotations, other stubs issues
Description
One of the things I find myself writing a lot is
if iscoroutinefunction(myfunction):
do_something_with_async(myfunction)
else:
do_something_with_just_sync(myfunction)however the else block doesn't narrow the type to non-awaitable. Shouldn't it? Some of the other is... functions in inspect seem to use TypeIs as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
stubs: improvementImprove/refactor existing annotations, other stubs issuesImprove/refactor existing annotations, other stubs issues