File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1223,11 +1223,14 @@ def check_func_def(
12231223 if defn .is_async_generator :
12241224 if not self .is_async_generator_return_type (typ .ret_type ):
12251225 self .fail (
1226- message_registry .INVALID_RETURN_TYPE_FOR_ASYNC_GENERATOR , typ
1226+ message_registry .INVALID_RETURN_TYPE_FOR_ASYNC_GENERATOR ,
1227+ typ .ret_type ,
12271228 )
12281229 else :
12291230 if not self .is_generator_return_type (typ .ret_type , defn .is_coroutine ):
1230- self .fail (message_registry .INVALID_RETURN_TYPE_FOR_GENERATOR , typ )
1231+ self .fail (
1232+ message_registry .INVALID_RETURN_TYPE_FOR_GENERATOR , typ .ret_type
1233+ )
12311234
12321235 # Fix the type if decorated with `@types.coroutine` or `@asyncio.coroutine`.
12331236 if defn .is_awaitable_coroutine :
You can’t perform that action at this time.
0 commit comments