diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-08-02 20:55:59 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-08-02 20:55:59 +0200 |
commit | a4c73b9ae79ab41f24a0c3834cd6fec6dd10a653 (patch) | |
tree | 5327c9d2b51f97bb2dbcaaa9c8e86de8802f0e93 /tests/scripts | |
parent | 3bc0453caec237ecd9a191be4141ffc37a643d65 (diff) | |
download | weechat-a4c73b9ae79ab41f24a0c3834cd6fec6dd10a653.zip |
tests: fix assignment in tcl script generator
Diffstat (limited to 'tests/scripts')
-rwxr-xr-x | tests/scripts/python/unparse.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py index 2a9c05b80..d387cd906 100755 --- a/tests/scripts/python/unparse.py +++ b/tests/scripts/python/unparse.py @@ -697,14 +697,15 @@ class UnparseTcl(UnparsePython): def _ast_assign(self, node): """Add an AST Assign in output.""" + exclude_types = (ast.Dict, ast.Str, ast.Subscript) self.add( self.fill, 'set ', node.targets[0], ' ', - '[' if not isinstance(node.value, ast.Str) else '', + '[' if not isinstance(node.value, exclude_types) else '', node.value, - ']' if not isinstance(node.value, ast.Str) else '', + ']' if not isinstance(node.value, exclude_types) else '', ) def _ast_attribute(self, node): |