aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests/if-else.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-07-25 12:38:58 +0800
committerGitHub <noreply@github.com>2023-07-25 12:38:58 +0800
commit7ef3b602501202ec762da218425acac751c49f9b (patch)
tree9527c3c4883259bf2ae3254a65fb7443248ae37f /tests/if-else.py
parentd304910159e6824dae201e4e4aeafa0ff7984292 (diff)
parente47db36c1143c688d82a6ae0794cf0c8c016e1c6 (diff)
downloadTRPGNivis-7ef3b602501202ec762da218425acac751c49f9b.tar.gz
TRPGNivis-7ef3b602501202ec762da218425acac751c49f9b.zip
Merge pull request #5 from HydroRoll-Team/sourcery/mkdocsmkdocs
add docs (Sourcery refactored)
Diffstat (limited to 'tests/if-else.py')
-rw-r--r--tests/if-else.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/if-else.py b/tests/if-else.py
index 933d567..f97322a 100644
--- a/tests/if-else.py
+++ b/tests/if-else.py
@@ -60,8 +60,7 @@ def execute_ast(ast, environment):
elif ast.operator == '>':
return left > right
elif isinstance(ast, IfNode):
- condition = execute_ast(ast.condition, environment)
- if condition:
+ if condition := execute_ast(ast.condition, environment):
execute_ast(ast.body, environment)
elif isinstance(ast, ReplyNode):
message = ast.message.format(**environment)