Skip to content

Commit

Permalink
PEP8 double aggressive W291 ~ W293 and W391
Browse files Browse the repository at this point in the history
  • Loading branch information
openvix-bot committed Aug 31, 2023
1 parent 4d92e56 commit 33e8ef1
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/python/Components/Converter/StreamInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def streamtype(self):
return ''

def streamurl(self):
playref = NavigationInstance.instance.getCurrentlyPlayingServiceReference()
playref = NavigationInstance.instance.getCurrentlyPlayingServiceReference()
if playref:
refstr = playref.toString()
if '%3a' in refstr:
Expand Down
4 changes: 2 additions & 2 deletions lib/python/Plugins/SystemPlugins/ViX/ImageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __onPartitionChange(*args, **kwargs):
("OpenBH", "https://images.openbh.net/json/%s", "getMachineMake"),
("OpenPLi", "http://downloads.openpli.org/json/%s", "HardwareInfo"),
]


autoImageManagerTimer = None

Expand Down Expand Up @@ -1653,7 +1653,7 @@ def getImageDistro(self):
url = path.join(self.imagefeed[URL], boxtype)
else: # New style: self.imagefeed[URL] contains "%s" and boxname is inserted there.
url = self.imagefeed[URL] % boxtype

# special case for openvix developer downloads using user/pass
if self.imagefeed[DISTRO].lower() == "openvix" \
and self.imagefeed[URL].startswith("https") \
Expand Down
2 changes: 1 addition & 1 deletion lib/python/Plugins/SystemPlugins/ViX/SoftcamManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ def JobStart(self):
camconf = "/etc/tuxbox/config/ncam.conf"
if not camconf:
print("[SoftcamManager] oscam.conf or ncam.conf not defined")
return
return
f = open(camconf, "r")
for line in f.readlines():
if line.find("httpport") != -1:
Expand Down
2 changes: 1 addition & 1 deletion lib/python/Screens/Ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def InitCiConfig():
("normal", _("Normal")),
("high", _("High")),
]
print("[CI][InitCiConfig] highBitrateChoices", highBitrateChoices)
print("[CI][InitCiConfig] highBitrateChoices", highBitrateChoices)
config.ci[slot].highBitrate = ConfigSelection(default="high", choices=highBitrateChoices)
config.ci[slot].highBitrate.slotid = slot
config.ci[slot].highBitrate.addNotifier(setCIBitrate)
Expand Down
4 changes: 2 additions & 2 deletions lib/python/Screens/EpgSelectionBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# function name, button label, help text
("", _("Do nothing")),
("openIMDb", _("IMDb Search"), _("IMDB search for current event")),
("openTMDb", _("TMDb Search"), _("TMDB search for current event")),
("openTMDb", _("TMDb Search"), _("TMDB search for current event")),
("sortEPG", _("Sort"), _("Sort the EPG list")),
("addEditTimer", _("Add Timer"), _("Add/Remove timer for current event")),
("openTimerList", _("Show Timer List")),
Expand Down Expand Up @@ -134,7 +134,7 @@ def __init__(self, session, epgConfig, startBouquet=None, startRef=None, bouquet
self.noAutotimer = _("The AutoTimer plugin is not installed!\nPlease install it.")
self.noEPGSearch = _("The EPGSearch plugin is not installed!\nPlease install it.")
self.noIMDb = _("The IMDb plugin is not installed!\nPlease install it.")
self.noTMDb = _("The TMDb plugin is not installed!\nPlease install it.")
self.noTMDb = _("The TMDb plugin is not installed!\nPlease install it.")
self.refreshTimer = eTimer()
self.refreshTimer.timeout.get().append(self.refreshList)
self.onLayoutFinish.append(self.onCreate)
Expand Down
4 changes: 2 additions & 2 deletions lib/python/Screens/FactoryReset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
mountOptions = getMountChoices()
if not mountOptions:
BackupFiles = None
print("[FactoryReset] DEBUG: mountOptions", mountOptions)
print("[FactoryReset] DEBUG: mountOptions", mountOptions)
except ImportError:
BackupFiles = None

Expand Down Expand Up @@ -125,7 +125,7 @@ def keySave(self):
if BackupFiles and self.doBackup.value:
msg = _("This will permanently delete the current configuration. If necessary it should be possible to restore the current configuration by restoring the settings backup. Are you certain you want to continue with a factory reset?")
elif self.doBackup.value:
msg = _("This will permanently delete the current configuration. Although settings backup requested, there is No backup device attached, are you certain you want to continue with a factory reset?")
msg = _("This will permanently delete the current configuration. Although settings backup requested, there is No backup device attached, are you certain you want to continue with a factory reset?")
else:
msg = _("This will permanently delete the current configuration. It would be a good idea to make a backup before taking this drastic action. Are you certain you want to continue with a factory reset?")
restartBox = self.session.openWithCallback(self.keySaveCallback, MessageBox, msg, default=False)
Expand Down
4 changes: 2 additions & 2 deletions lib/python/Screens/VuWizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"python3-future",
"python3-mime",
"alsa",
"firmware",
"firmware",
"glibc",
"gnome-themes",
"kernel-module",
Expand Down Expand Up @@ -180,7 +180,7 @@ def readOpkg(self, result, retval, extra_args):
cmdlist.append("/usr/bin/opkg remove --autoremove --add-dest /:/ " + parts[0] + " --force-remove --force-depends")
continue
# print("[VuWizard] cmdlist", cmdlist)
if cmdlist:
if cmdlist:
cmdlist.append("rm -f /usr/share/fonts/wqy-microhei.ttc")
self.Console.eBatch(cmdlist, self.bootSlot, debug=False)
else:
Expand Down
18 changes: 9 additions & 9 deletions lib/python/StartEnigma.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from os.path import exists as osexists
import sys # don't change import
import sys # don't change import
from time import localtime, strftime, time
from datetime import datetime
from traceback import print_exc
Expand Down Expand Up @@ -170,10 +170,10 @@ def close(self, screen, *retval):
# Be sure that the close is for the right dialog!
# If it's not, you probably closed after another dialog was opened.
# This can happen if you open a dialog onExecBegin, and forget to do this only once.
#
#
# After close of the top dialog, the underlying dialog will gain focus again (for a short time),
# thus triggering the onExec, which opens the dialog again, closing the loop.
#
#
assert screen == self.current_dialog

self.current_dialog.returnValue = retval
Expand Down Expand Up @@ -333,7 +333,7 @@ def runScreenTest():
Tools.Trashcan.init(session)
if not VuRecovery:
CiHandler.setSession(session)

screensToRun = [p.fnc for p in plugins.getPlugins(PluginDescriptor.WHERE_WIZARD)]
profile("wizards")
screensToRun += wizardManager.getWizards()
Expand Down Expand Up @@ -363,7 +363,7 @@ def runNextScreen(session, screensToRun, *result):
vol = VolumeControl(session)
profile("Init:PowerKey")
power = PowerKey(session)

if enigma.eAVSwitch.getInstance().haveScartSwitch():
# we need session.scart to access it from within menu.xml
session.scart = AutoScartControl(session)
Expand Down Expand Up @@ -451,15 +451,15 @@ def runNextScreen(session, screensToRun, *result):

# SetupDevices sets up defaults:- language, keyboard, parental & expert config.
# Moving further down will break translation.
# Moving further up will break imports in config.py
# Moving further up will break imports in config.py
profile("SetupDevices")
print("[StartEnigma] Initialising SetupDevices.")
from Components.SetupDevices import InitSetupDevices
InitSetupDevices()

if getImageArch() in ("aarch64"):
from usb.backend import libusb1
libusb1.get_backend(find_library=lambda x: "/lib64/libusb-1.0.so.0")
libusb1.get_backend(find_library=lambda x: "/lib64/libusb-1.0.so.0")


profile("ClientMode")
Expand Down Expand Up @@ -552,7 +552,7 @@ def quietEmit(self, eventDict):
if text is None:
return
if "/api/statusinfo" in text: # Do not log OpenWebif status info.
return
return
formatDict = {
"text": text.replace("\n", "\n\t")
}
Expand All @@ -563,7 +563,7 @@ def quietEmit(self, eventDict):
logger = log.FileLogObserver(sys.stdout) # do not change or no crashlog
log.FileLogObserver.emit = quietEmit
backup_stdout = sys.stdout # backup stdout and stderr redirections
backup_stderr = sys.stderr
backup_stderr = sys.stderr
log.startLoggingWithObserver(logger.emit)
sys.stdout = backup_stdout # restore stdout and stderr redirections because of twisted redirections
sys.stderr = backup_stderr
Expand Down

0 comments on commit 33e8ef1

Please sign in to comment.