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:
@@ -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,
|
||||
')',
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user