mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 11:43:13 +02:00
tests: fix assignment in tcl script generator
This commit is contained in:
@@ -697,14 +697,15 @@ class UnparseTcl(UnparsePython):
|
|||||||
|
|
||||||
def _ast_assign(self, node):
|
def _ast_assign(self, node):
|
||||||
"""Add an AST Assign in output."""
|
"""Add an AST Assign in output."""
|
||||||
|
exclude_types = (ast.Dict, ast.Str, ast.Subscript)
|
||||||
self.add(
|
self.add(
|
||||||
self.fill,
|
self.fill,
|
||||||
'set ',
|
'set ',
|
||||||
node.targets[0],
|
node.targets[0],
|
||||||
' ',
|
' ',
|
||||||
'[' if not isinstance(node.value, ast.Str) else '',
|
'[' if not isinstance(node.value, exclude_types) else '',
|
||||||
node.value,
|
node.value,
|
||||||
']' if not isinstance(node.value, ast.Str) else '',
|
']' if not isinstance(node.value, exclude_types) else '',
|
||||||
)
|
)
|
||||||
|
|
||||||
def _ast_attribute(self, node):
|
def _ast_attribute(self, node):
|
||||||
|
|||||||
Reference in New Issue
Block a user