aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/core/internal_eval
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2023-08-23 10:31:24 +0100
committerGravatar wookie184 <[email protected]>2023-08-23 10:31:24 +0100
commit6ebc2806b1b2737c27c090da324d85577ea67fb6 (patch)
tree1fb65b1dd1c8185bab4874dfc8fe5e272f20de3d /bot/exts/core/internal_eval
parentHandle snakes without images (diff)
parentCorrected attribute name to fetch github url in extensions.py (#1348) (diff)
Merge branch 'main' into snakes-cleanup
Diffstat (limited to 'bot/exts/core/internal_eval')
-rw-r--r--bot/exts/core/internal_eval/_helpers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/exts/core/internal_eval/_helpers.py b/bot/exts/core/internal_eval/_helpers.py
index 34ef7fef..30c4b11c 100644
--- a/bot/exts/core/internal_eval/_helpers.py
+++ b/bot/exts/core/internal_eval/_helpers.py
@@ -227,7 +227,7 @@ class CaptureLastExpression(ast.NodeTransformer):
log.trace("Found a trailing last expression in the evaluation code")
log.trace("Creating assignment statement with trailing expression as the right-hand side")
- right_hand_side = list(ast.iter_child_nodes(node))[0]
+ right_hand_side = next(iter(ast.iter_child_nodes(node)))
assignment = ast.Assign(
targets=[ast.Name(id="_value_last_expression", ctx=ast.Store())],