From fcfee64c3ad2514dc2283b51ed412a6d17ad6e0b Mon Sep 17 00:00:00 2001 From: trigg Date: Tue, 7 May 2024 21:29:14 +0100 Subject: [PATCH] - Avoid import errors as there's no use checking them here - - Doing so successfully would require we use python pip for our packaging, which is a problem for another day - Some minor alterations for pylint --- .github/workflows/CI.yml | 2 +- src/script/arch-update-tray.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 853f86b..7159e42 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -24,4 +24,4 @@ jobs: run: find . -name '*.sh' -exec shellcheck --color=always {} + - name: Run pylint - run: find . -name '*.py' -exec pylint --output-format=colorized {} + + run: find . -name '*.py' -exec pylint -d E0611,E0401 --output-format=colorized {} + diff --git a/src/script/arch-update-tray.py b/src/script/arch-update-tray.py index 9d64f47..05976f4 100755 --- a/src/script/arch-update-tray.py +++ b/src/script/arch-update-tray.py @@ -99,7 +99,7 @@ def file_changed(self, a=None, b=None, c=None, d=None): except FileNotFoundError: log.error("Statefile Missing") sys.exit(1) - if (contents.startswith("arch-update")): + if contents.startswith("arch-update"): self.ind.set_icon(contents) def update(self, button=None): @@ -133,7 +133,7 @@ class ArchUpdateQt6: def file_changed(self): contents = "" - if self.watcher and not (self.statefile in self.watcher.files()): + if self.watcher and not self.statefile in self.watcher.files(): self.watcher.addPath(self.statefile) try: with open(self.statefile, 'r') as f: @@ -141,7 +141,7 @@ def file_changed(self): except FileNotFoundError: log.error("Statefile Missing") sys.exit(1) - if (contents.startswith("arch-update")): + if contents.startswith("arch-update"): icon = QIcon.fromTheme(contents) self.tray.setIcon(icon)