diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f14bbf3a..3326dd60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -87,9 +87,8 @@ jobs: - name: Check code with flake8 run: | flake8 --ignore=W191,W504,E126,E127,E128,E501 --show-source --exclude=./src/compat.py,./src/jsinterp.py,./test/enigmahelper.py,./test/try_plugin.py,./src/__init__.py - flake8 --ignore=W191,E501,F821 --show-source --filename=./test/try_plugin.py - flake8 --ignore=W191,F401,E128,E402,E501 --show-source --filename=./src/jsinterp.py,./test/enigmahelper.py,./src/__init__.py - flake8 --ignore=W191,F821,F401 --show-source --filename=./src/compat.py + flake8 --ignore=W191,E501 --show-source --filename=./src/jsinterp.py,./test/enigmahelper.py,./test/try_plugin.py,./src/__init__.py + flake8 --ignore=W191,F401 --show-source --filename=./src/compat.py - name: Remove enigma2 imports and variables for test run: | echo "" > src/__init__.py diff --git a/src/__init__.py b/src/__init__.py index fe083d6e..70f132fd 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -11,8 +11,10 @@ def locale_init(): environ["LANGUAGE"] except KeyError: # On old images LANGUAGE environment is not set environ["LANGUAGE"] = language.getLanguage()[:2] - gettext.bindtextdomain("YouTube", resolveFilename(SCOPE_PLUGINS, - "Extensions/YouTube/locale")) + gettext.bindtextdomain( + "YouTube", + resolveFilename(SCOPE_PLUGINS, "Extensions/YouTube/locale") + ) def _(txt): @@ -35,8 +37,8 @@ def ngettext(singular, plural, n): try: # Check functions for full svg and scaling support - from enigma import loadSVG - from skin import applySkinFactor + from enigma import loadSVG # noqa: F401 + from skin import applySkinFactor # noqa: F401 screenwidth = 'svg' except ImportError: from enigma import getDesktop diff --git a/test/enigmahelper.py b/test/enigmahelper.py index 98e4fa96..b6eacb2a 100644 --- a/test/enigmahelper.py +++ b/test/enigmahelper.py @@ -93,8 +93,7 @@ def start_callback(self, singleshot): def start(self, msec, singleshot=False): if int(msec) == 1000: from threading import Thread - self.callback_thread = Thread(target=self.start_callback, - args=(singleshot,)) + self.callback_thread = Thread(target=self.start_callback, args=(singleshot,)) self.callback_thread.start() else: self.start_callback(singleshot) @@ -500,8 +499,7 @@ def openWithCallback(self, callback, screen, *arguments, **kwargs): def open(self, screen, *arguments, **kwargs): print('Session open ', screen) self.pushCurrent() - dlg = self.current_dialog = self.instantiateDialog(screen, - *arguments, **kwargs) + dlg = self.current_dialog = self.instantiateDialog(screen, *arguments, **kwargs) dlg.callback = None self.execBegin() @@ -541,7 +539,7 @@ def new_index(self, value): return 0 -from Screens.Screen import Screen +from Screens.Screen import Screen # noqa: E402 class new_movie_player(Screen): @@ -594,7 +592,7 @@ def start_session(): from Screens import InfoBar InfoBar.MoviePlayer = new_movie_player try: - from Screens.SimpleSummary import SimpleSummary + from Screens.SimpleSummary import SimpleSummary # noqa: F401 except ImportError: pass