From 2d6d902428b45f6cb5ca2d4d6b93a9823ef74d8a Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Wed, 14 Sep 2022 08:43:02 +0200 Subject: [PATCH] tree: pep8 + linter fixes For some reasons I forgot to fix those in the previous runs. Fix a linter and pep8 warning. Signed-off-by: David Rheinsberg --- test/mod/test_fmt_v2.py | 2 +- tools/osbuild-mpp | 4 +++- tools/tree-diff | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/test/mod/test_fmt_v2.py b/test/mod/test_fmt_v2.py index 48c7821d..e9e01ace 100644 --- a/test/mod/test_fmt_v2.py +++ b/test/mod/test_fmt_v2.py @@ -344,7 +344,7 @@ class TestFormatV2(unittest.TestCase): def test_device_sorting(self): fmt = self.index.get_format_info("osbuild.formats.v2").module - assert(fmt) + assert fmt self_cycle = { "a": {"parent": "a"}, diff --git a/tools/osbuild-mpp b/tools/osbuild-mpp index a1f0589a..150e0f03 100755 --- a/tools/osbuild-mpp +++ b/tools/osbuild-mpp @@ -573,7 +573,8 @@ LocalFileSigLevel = Optional cfgfile.write(f"[{rid}]\n") cfgfile.write(f"Server = {url}\n") - def _pacman(self, *args): + @staticmethod + def _pacman(*args): return subprocess.check_output(["pacman", *args], encoding="utf-8") def resolve(self, packages, _): @@ -1228,6 +1229,7 @@ class ManifestFile: name = desc.get("id", "image") self.vars[name] = Image.from_dict(desc) + # pylint: disable=no-self-use def get_pipeline_name(self, node): return node.get("name", "") diff --git a/tools/tree-diff b/tools/tree-diff index bc542fa5..10c1cdb4 100755 --- a/tools/tree-diff +++ b/tools/tree-diff @@ -81,6 +81,7 @@ def symlink_diff(name, dir_fd1, dir_fd2, path, differences): props["symlink"] = [os.fsdecode(target1), os.fsdecode(target2)] +# pylint: disable=too-many-branches def diff_aux(dir_fd1, dir_fd2, path, report): entries1 = set() with os.scandir(dir_fd1) as it: