Skip to content

Commit e47db36

Browse files
author
Sourcery AI
committed
'Refactored by Sourcery'
1 parent d304910 commit e47db36

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/if-else.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ def execute_ast(ast, environment):
6060
elif ast.operator == '>':
6161
return left > right
6262
elif isinstance(ast, IfNode):
63-
condition = execute_ast(ast.condition, environment)
64-
if condition:
63+
if condition := execute_ast(ast.condition, environment):
6564
execute_ast(ast.body, environment)
6665
elif isinstance(ast, ReplyNode):
6766
message = ast.message.format(**environment)

0 commit comments

Comments
 (0)