From 2b06b53a29d374a67336e4d548be7bc4596e7494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 24 Oct 2017 23:30:32 +0200 Subject: [PATCH] tests: add quotes in Lua tables --- tests/scripts/python/unparse.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py index 2c89bb73a..741d3ef2e 100755 --- a/tests/scripts/python/unparse.py +++ b/tests/scripts/python/unparse.py @@ -565,11 +565,6 @@ class UnparseLua(UnparsePython): 'Gt': '>', 'GtE': '>=', } - self._var_quotes = True - - def _set_var_quotes(self, value): - """Set boolean to quote variables.""" - self._var_quotes = value def _ast_binop(self, node): """Add an AST BinOp in output.""" @@ -590,11 +585,7 @@ class UnparseLua(UnparsePython): self.add( '{', self.make_list([ - [(self._set_var_quotes, False), - key, - (self._set_var_quotes, True), - '=', - value] + ['[', key, ']', '=', value] for key, value in zip(node.keys, node.values)]), '}', ) @@ -643,10 +634,6 @@ class UnparseLua(UnparsePython): """Add an AST Pass in output.""" pass - def _ast_str(self, node): - """Add an AST Str in output.""" - self.add(repr(node.s) if self._var_quotes else node.s) - class UnparseTcl(UnparsePython): """