From 086ad75ba40c006dc9920efabddbf089f13d51ea Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Tue, 26 May 2020 17:34:23 +0200 Subject: [PATCH] test: mark static methods as @staticmethod Turn some of our methods into static methods and mark them as such, making pylint even happier. --- test/test.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test.py b/test/test.py index c6c71fc3..63522fc8 100644 --- a/test/test.py +++ b/test/test.py @@ -214,7 +214,8 @@ class OSBuild(contextlib.AbstractContextManager): self._cachedir = None self._exitstack = None - def _print_result(self, code, data_stdout, data_stderr): + @staticmethod + def _print_result(code, data_stdout, data_stderr): print(f"osbuild failed with: {code}") try: json_stdout = json.loads(data_stdout) @@ -284,7 +285,8 @@ class OSBuild(contextlib.AbstractContextManager): data_stdin = f.read() return self.compile(data_stdin, checkpoints=checkpoints) - def treeid_from_manifest(self, manifest_data): + @staticmethod + def treeid_from_manifest(manifest_data): """Calculate Tree ID This takes an in-memory manifest, inspects it, and returns the ID of