1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

tests: fix unary op in script generator

This commit is contained in:
Sébastien Helleu
2022-08-02 20:51:40 +02:00
parent 39f2b2f7b9
commit 237c37e719
+1 -4
View File
@@ -74,7 +74,7 @@ class UnparsePython(object):
}
self.unaryop = {
'Invert': '~',
'Not': 'not',
'Not': 'not ',
'UAdd': '+',
'USub': '-',
}
@@ -301,11 +301,8 @@ class UnparsePython(object):
def _ast_unaryop(self, node):
"""Add an AST UnaryOp in output."""
self.add(
'(',
self.unaryop[node.op.__class__.__name__],
' ',
node.operand,
')',
)