diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-04 21:11:41 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2023-01-04 21:11:41 +0100 |
commit | d1f2d54a1e654390f77e85bd271d5f6dff8d4735 (patch) | |
tree | af43715330c942e50b321af84a9b4b691623689d /tests | |
parent | 0ce0fa9f1f6f4e2defc23cce10b0e636f6feba0b (diff) | |
download | weechat-d1f2d54a1e654390f77e85bd271d5f6dff8d4735.zip |
tests: mark methods is_bool and is_number as static
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/scripts/python/unparse.py | 6 |
1 files 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 |