From d1f2d54a1e654390f77e85bd271d5f6dff8d4735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 4 Jan 2023 21:11:41 +0100 Subject: [PATCH] tests: mark methods is_bool and is_number as static --- tests/scripts/python/unparse.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/scripts/python/unparse.py b/tests/scripts/python/unparse.py index 92e9a6e5c..cf1af184e 100755 --- a/tests/scripts/python/unparse.py +++ b/tests/scripts/python/unparse.py @@ -139,11 +139,13 @@ class UnparsePython(object): result.append(value) return result - def is_bool(self, node): # pylint: disable=no-self-use + @staticmethod + def is_bool(node): """Check if the node is a boolean.""" return isinstance(node, ast.Name) and node.id in ('False', 'True') - def is_number(self, node): # pylint: disable=no-self-use + @staticmethod + def is_number(node): """Check if the node is a number.""" return (isinstance(node, ast.Num) or (isinstance(node, ast.UnaryOp) and