aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-09-07 12:12:41 -0700
committerEli Schwartz <eschwartz@archlinux.org>2022-10-03 00:14:43 -0400
commit20d76b835372c0caf9cc3aac14b4984cac42f67a (patch)
tree8eb661c20d791fc6b834a83aefb8f1672a3ecd78 /mesonbuild/ast
parent676e66f8530ac45441c160eb8fe1d84a0703ceb6 (diff)
downloadmeson-20d76b835372c0caf9cc3aac14b4984cac42f67a.zip
meson-20d76b835372c0caf9cc3aac14b4984cac42f67a.tar.gz
meson-20d76b835372c0caf9cc3aac14b4984cac42f67a.tar.bz2
pylint: enable unnecessary-comprehension
Diffstat (limited to 'mesonbuild/ast')
-rw-r--r--mesonbuild/ast/interpreter.py4
-rw-r--r--mesonbuild/ast/printer.py3
2 files changed, 3 insertions, 4 deletions
diff --git a/mesonbuild/ast/interpreter.py b/mesonbuild/ast/interpreter.py
index c510eee..7484e04 100644
--- a/mesonbuild/ast/interpreter.py
+++ b/mesonbuild/ast/interpreter.py
@@ -365,10 +365,10 @@ class AstInterpreter(InterpreterBase):
result = not result
elif isinstance(node, ArrayNode):
- result = [x for x in node.args.arguments]
+ result = node.args.arguments.copy()
elif isinstance(node, ArgumentNode):
- result = [x for x in node.arguments]
+ result = node.arguments.copy()
elif isinstance(node, ArithmeticNode):
if node.operation != 'add':
diff --git a/mesonbuild/ast/printer.py b/mesonbuild/ast/printer.py
index b095f53..1e33cf0 100644
--- a/mesonbuild/ast/printer.py
+++ b/mesonbuild/ast/printer.py
@@ -173,9 +173,8 @@ class AstPrinter(AstVisitor):
def visit_ForeachClauseNode(self, node: mparser.ForeachClauseNode) -> None:
node.lineno = self.curr_line or node.lineno
- varnames = [x for x in node.varnames]
self.append_padded('foreach', node)
- self.append_padded(', '.join(varnames), node)
+ self.append_padded(', '.join(node.varnames), node)
self.append_padded(':', node)
node.items.accept(self)
self.newline()