@@ -931,18 +931,14 @@ async def ast_not_implemented(self, arg, *args):
931
931
name = "ast_" + arg .__class__ .__name__ .lower ()
932
932
raise NotImplementedError (f"{ self .name } : not implemented ast " + name )
933
933
934
- async def aeval (self , arg , undefined_check = True , do_await = True ):
934
+ async def aeval (self , arg , undefined_check = True ):
935
935
"""Vector to specific function based on ast class type."""
936
936
name = "ast_" + arg .__class__ .__name__ .lower ()
937
937
try :
938
938
if hasattr (arg , "lineno" ):
939
939
self .lineno = arg .lineno
940
940
self .col_offset = arg .col_offset
941
- val = (
942
- await getattr (self , name , self .ast_not_implemented )(arg )
943
- if do_await
944
- else getattr (self , name , self .ast_not_implemented )(arg )
945
- )
941
+ val = await getattr (self , name , self .ast_not_implemented )(arg )
946
942
if undefined_check and isinstance (val , EvalName ):
947
943
raise NameError (f"name '{ val .name } ' is not defined" )
948
944
return val
@@ -2025,7 +2021,7 @@ async def ast_formattedvalue(self, arg):
2025
2021
2026
2022
async def ast_await (self , arg ):
2027
2023
"""Evaluate await expr."""
2028
- coro = await self .aeval (arg .value , do_await = False )
2024
+ coro = await self .aeval (arg .value )
2029
2025
if coro and asyncio .iscoroutine (coro ):
2030
2026
return await coro
2031
2027
return coro
0 commit comments