From 8639de2dee7cd0abfb064d2b75874bde247194c3 Mon Sep 17 00:00:00 2001 From: Wolfgang Maier Date: Wed, 26 Aug 2020 14:06:40 +0200 Subject: [PATCH] Allow unary plus and minus in filtering --- tools/stats/filtering.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/stats/filtering.py b/tools/stats/filtering.py index 17047b6ec6e..9d7fdcc3875 100644 --- a/tools/stats/filtering.py +++ b/tools/stats/filtering.py @@ -12,7 +12,8 @@ AST_NODE_TYPE_WHITELIST = [ 'Expr', 'Load', 'Str', 'Num', 'BoolOp', 'Compare', 'And', 'Eq', 'NotEq', 'Or', 'GtE', 'LtE', 'Lt', 'Gt', 'BinOp', 'Add', 'Div', 'Sub', 'Mult', 'Mod', 'Pow', 'LShift', 'GShift', 'BitAnd', 'BitOr', 'BitXor', 'UnaryOp', 'Invert', - 'Not', 'NotIn', 'In', 'Is', 'IsNot', 'List', 'Index', 'Subscript', + 'Not', 'UAdd', 'USub', 'NotIn', 'In', 'Is', 'IsNot', 'List', 'Index', + 'Subscript', # Further checks 'Name', 'Call', 'Attribute', ]