Skip to content

Commit

Permalink
PEP8 double aggressive E301 ~ E306
Browse files Browse the repository at this point in the history
  • Loading branch information
openvix-bot committed Aug 31, 2023
1 parent 3028777 commit 4d92e56
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/python/Components/Converter/StreamInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import NavigationInstance
from enigma import iPlayableService


class StreamInfo(Converter):
STREAMURL = 0
STREAMTYPE = 1
Expand Down
1 change: 0 additions & 1 deletion lib/python/Components/Harddisk.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ def mount(self):
sleep(3) # Give udev some time to make the mount, which it will do asynchronously.
return exitCode


def killPartitionTable(self):
zero = 512 * b"\0"
try:
Expand Down
12 changes: 12 additions & 0 deletions lib/python/Plugins/SystemPlugins/FastChannelChange/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@

FccInstance = None


def FCCChanged():
if FccInstance:
FccInstance.FCCSetupChanged()


def checkSupportFCC():
global g_max_fcc
return bool(g_max_fcc)


class FCCSupport:
def __init__(self, session):
self.session = session
Expand Down Expand Up @@ -447,6 +450,7 @@ def FCCTimeoutTimerStop(self):
self.fccTimeoutWait = None
self.fccTimeoutTimer.stop()


class FCCSetup(Screen, ConfigListScreen):
def __init__(self, session):
Screen.__init__(self, session)
Expand Down Expand Up @@ -511,12 +515,14 @@ def keySave(self):
ConfigListScreen.keySave(self)
FCCChanged()


def getExtensionName():
if config.plugins.fccsetup.activate.value:
return _("Disable Fast Channel Change")

return _("Enable Fast Channel Change")


def ToggleUpdate():
if config.plugins.fccsetup.activate.value:
config.plugins.fccsetup.activate.value = False
Expand All @@ -525,29 +531,35 @@ def ToggleUpdate():
config.plugins.fccsetup.activate.save()
FCCChanged()


def FCCSupportInit(reason, **kwargs):
if "session" in kwargs:
global FccInstance
FccInstance = FCCSupport(kwargs["session"])


def showFCCExtentionMenu():
currentScreenName = None
if FccInstance:
currentScreenName = FccInstance.session.current_dialog.__class__.__name__
return (currentScreenName == "InfoBar")


def addExtentions(infobarExtensions):
infobarExtensions.addExtension((getExtensionName, ToggleUpdate, showFCCExtentionMenu), None)


def FCCStart(session, **kwargs):
session.open(FCCSetup)


def main(menuid, **kwargs):
if menuid == "scan":
return [(_("Fast Channel Change"), FCCStart, "FCCSetup", 5)]
else:
return []


def Plugins(**kwargs):
list = []

Expand Down
1 change: 1 addition & 0 deletions lib/python/Plugins/SystemPlugins/ViX/BackupManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,7 @@ def Stage4(self):
self.Stage4Completed = True

tar_flist = "/tmp/_backup-files.list" # Filename for backup list

def Stage5(self):
tmplist = config.backupmanager.backupdirs.value
tmplist.append("/tmp/ExtraInstalledPlugins")
Expand Down
1 change: 1 addition & 0 deletions lib/python/Plugins/SystemPlugins/ViX/ScriptRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def updateExtensions(configElement):

config.scriptrunner.showinextensions.addNotifier(updateExtensions, initial_call=False)


def ScriptRunnerAutostart(reason, session=None, **kwargs):
"""called with reason=1 during /sbin/shutdown.sysvinit, with reason=0 at startup"""
pass
Expand Down
1 change: 0 additions & 1 deletion lib/python/Screens/EpgSelectionBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ def openTMDb(self):
if event is not None:
self.session.open(tmdbScreen, event.getEventName(), 2)


def openEPGSearch(self):
self.closeEventViewDialog()
try:
Expand Down
1 change: 1 addition & 0 deletions lib/python/Screens/FactoryReset.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
except ImportError:
BackupFiles = None


class FactoryReset(Setup, ProtectedScreen):
def __init__(self, session):
self.resetFull = ConfigYesNo(default=True)
Expand Down
12 changes: 8 additions & 4 deletions lib/python/StartEnigma.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def reloadSkin(self):
print("[SkinReloader] closing InfoBar")
InfoBar.InfoBar.instance.close("reloadskin", reloadNotification)


class PowerKey:
""" PowerKey - handles the powerkey press and powerkey release actions"""

Expand Down Expand Up @@ -289,6 +290,7 @@ def standby(self):
if not Screens.Standby.inStandby and self.session.current_dialog and self.session.current_dialog.ALLOW_SUSPEND and self.session.in_exec:
self.session.open(Screens.Standby.Standby)


class AutoScartControl:
def __init__(self, session):
self.force = False
Expand All @@ -312,6 +314,7 @@ def VCRSbChanged(self, value):
else:
self.scartDialog.switchToTV()


def runScreenTest():
config.misc.startCounter.value += 1
config.misc.startCounter.save()
Expand Down Expand Up @@ -365,7 +368,6 @@ def runNextScreen(session, screensToRun, *result):
# we need session.scart to access it from within menu.xml
session.scart = AutoScartControl(session)


profile("Init:AutoVideoMode")
import Screens.VideoMode
Screens.VideoMode.autostart(session)
Expand Down Expand Up @@ -437,6 +439,7 @@ def runNextScreen(session, screensToRun, *result):
InfoBarGenerics.saveResumePoints()
return 0


profile("PYTHON_START")
print("[StartEnigma] Starting Python Level Initialisation.")
print("[StartEnigma] Image Type -> '%s'" % getImageType())
Expand Down Expand Up @@ -478,11 +481,9 @@ def runNextScreen(session, screensToRun, *result):
print("[StartEnigma] Initialising Bouquets.")
config.misc.load_unlinked_userbouquets = ConfigYesNo(default=False)


def setLoadUnlinkedUserbouquets(configElement):
enigma.eDVBDB.getInstance().setLoadUnlinkedUserbouquets(configElement.value)


config.misc.load_unlinked_userbouquets.addNotifier(setLoadUnlinkedUserbouquets)
if config.clientmode.enabled.value == False:
enigma.eDVBDB.getInstance().reloadBouquets()
Expand Down Expand Up @@ -610,9 +611,13 @@ def quietEmit(self, eventDict):

# must be above skins and InputDevices
config.misc.RCSource = ConfigSelection(default="branding", choices=[("branding", _("OE-A-Branding")), ("hardware", _("OE-A-Remotes"))])


def RCSelectionChanged(configelement):
from Components.SystemInfo import setRCFile
setRCFile(configelement.value)


config.misc.RCSource.addNotifier(RCSelectionChanged, immediate_feedback=False)

profile("Standby,PowerKey")
Expand Down Expand Up @@ -733,7 +738,6 @@ def RCSelectionChanged(configelement):
from Screens.Ci import InitCiConfig
InitCiConfig()


if config.clientmode.enabled.value:
import Components.ChannelsImporter
Components.ChannelsImporter.autostart()
Expand Down

0 comments on commit 4d92e56

Please sign in to comment.