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.
One of the things I find myself writing a lot is
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.