diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-04-22 14:57:07 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-04-25 12:28:51 -0700 |
commit | 346ab9f0d85122ca50f4051d0aedbcf7f3234cdb (patch) | |
tree | 55d5dea336faa7a7dba745b88ef8c6cf8cf02fc3 /mesonbuild/ast/printer.py | |
parent | 13d59d75be140b32fbef8c54c5d689ed1e30926f (diff) | |
download | meson-346ab9f0d85122ca50f4051d0aedbcf7f3234cdb.zip meson-346ab9f0d85122ca50f4051d0aedbcf7f3234cdb.tar.gz meson-346ab9f0d85122ca50f4051d0aedbcf7f3234cdb.tar.bz2 |
ast/printer: remove useless ternary
The ternary returns True or False from an expression that returns True
or False: i.e. True if bool(value) else False.
Diffstat (limited to 'mesonbuild/ast/printer.py')
-rw-r--r-- | mesonbuild/ast/printer.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/ast/printer.py b/mesonbuild/ast/printer.py index 60e0b0d..2de1d0c 100644 --- a/mesonbuild/ast/printer.py +++ b/mesonbuild/ast/printer.py @@ -179,7 +179,7 @@ class AstPrinter(AstVisitor): node.falseblock.accept(self) def visit_ArgumentNode(self, node: mparser.ArgumentNode): - break_args = True if (len(node.arguments) + len(node.kwargs)) > self.arg_newline_cutoff else False + break_args = (len(node.arguments) + len(node.kwargs)) > self.arg_newline_cutoff for i in node.arguments + list(node.kwargs.values()): if not isinstance(i, mparser.ElementaryNode): break_args = True |