File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1223,14 +1223,11 @@ 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 ,
1227- typ .ret_type ,
1226+ message_registry .INVALID_RETURN_TYPE_FOR_ASYNC_GENERATOR , defn
12281227 )
12291228 else :
12301229 if not self .is_generator_return_type (typ .ret_type , defn .is_coroutine ):
1231- self .fail (
1232- message_registry .INVALID_RETURN_TYPE_FOR_GENERATOR , typ .ret_type
1233- )
1230+ self .fail (message_registry .INVALID_RETURN_TYPE_FOR_GENERATOR , defn )
12341231
12351232 # Fix the type if decorated with `@types.coroutine` or `@asyncio.coroutine`.
12361233 if defn .is_awaitable_coroutine :
You can’t perform that action at this time.
0 commit comments