From 334f3e0ed945352d49ce2595d7a5ec7cd37dbd92 Mon Sep 17 00:00:00 2001 From: persianpros Date: Wed, 14 Apr 2021 00:13:49 +0430 Subject: [PATCH] PEP8 double aggressive E225 ~ E228 and E231 --- NeoBoot/files/devices.py | 2 +- NeoBoot/files/stbbranding.py | 12 ++++++------ NeoBoot/plugin.py | 6 +++--- NeoBoot/tmpfiles/runpy/arm_run.py | 2 +- NeoBoot/tmpfiles/runpy/duo4k_run.py | 2 +- NeoBoot/tmpfiles/runpy/duo4kse_run.py | 2 +- NeoBoot/tmpfiles/runpy/mips_run.py | 2 +- NeoBoot/tmpfiles/runpy/vu4k_run.py | 2 +- NeoBoot/tmpfiles/runpy/vu_mtd1_run.py | 2 +- NeoBoot/tmpfiles/runpy/vu_mtd2_run.py | 2 +- NeoBoot/tmpfiles/runpy/zero4k_run.py | 2 +- NeoBoot/ubi_reader_arm/ubi/block/__init__.py | 2 +- NeoBoot/ubi_reader_mips/ubi/block/__init__.py | 2 +- 13 files changed, 20 insertions(+), 20 deletions(-) diff --git a/NeoBoot/files/devices.py b/NeoBoot/files/devices.py index 5c4a5df..f47c593 100644 --- a/NeoBoot/files/devices.py +++ b/NeoBoot/files/devices.py @@ -557,7 +557,7 @@ class SetDiskLabel(Screen): def __init__(self, session): global liczymy Screen.__init__(self, session) - self.labList = ['hdd', 'usb','card', 'cf'] + self.labList = ['hdd', 'usb', 'card', 'cf'] self.list = [] self.sprDev() self.devlist = [] diff --git a/NeoBoot/files/stbbranding.py b/NeoBoot/files/stbbranding.py index 02f0532..a872cba 100644 --- a/NeoBoot/files/stbbranding.py +++ b/NeoBoot/files/stbbranding.py @@ -12,13 +12,13 @@ LogFileObj = None def Log(param=''): global LogFileObj #first close object if exists - if param.lower() in ['open','write','append','close']: + if param.lower() in ['open', 'write', 'append', 'close']: if LogFileObj is not None: LogFileObj.close() if LogFileObj.closed: LogFileObj = None try: - with open('/tmp/NeoBoot.log','a') as f: + with open('/tmp/NeoBoot.log', 'a') as f: f.write('LogFile closed properly\n') f.close() except Exception: @@ -27,7 +27,7 @@ def Log(param=''): print("ERROR closing LogFile!!!") #second create object if does not exist if LogFileObj is None: - if param.lower() in ['open','write']: + if param.lower() in ['open', 'write']: LogFileObj = open(LogFile, "w") elif param.lower() in ['append']: LogFileObj = open(LogFile, "a") @@ -415,7 +415,7 @@ def getBoxVuModel(): def getVuModel(): if fileExists("/proc/stb/info/vumodel") and not fileExists("/proc/stb/info/boxtype"): brand = "Vu+" - f = open("/proc/stb/info/vumodel",'r') + f = open("/proc/stb/info/vumodel", 'r') procmodel = f.readline().strip() f.close() model = procmodel.title().replace("olose", "olo SE").replace("olo2se", "olo2 SE").replace("2", "²") @@ -473,13 +473,13 @@ def getImageDistroN(): f.close() elif not fileExists('/.multinfo') and fileExists('/etc/vtiversion.info'): - f = open("/etc/vtiversion.info",'r') + f = open("/etc/vtiversion.info", 'r') imagever = f.readline().strip().replace("Release ", " ") f.close() image = imagever elif not fileExists('/.multinfo') and fileExists('/etc/bhversion'): - f = open("/etc/bhversion",'r') + f = open("/etc/bhversion", 'r') imagever = f.readline().strip() f.close() image = imagever diff --git a/NeoBoot/plugin.py b/NeoBoot/plugin.py index eb20178..333bcd4 100644 --- a/NeoBoot/plugin.py +++ b/NeoBoot/plugin.py @@ -463,7 +463,7 @@ class NeoBootInstallation(Screen): os.system('rm -f /etc/neoimage; rm -f /etc/imageboot; rm -f %sImageBoot/.neonextboot; rm -f %sImageBoot/.version; rm -f %sImageBoot/.Flash; ' % (getNeoLocation(), getNeoLocation(), getNeoLocation())) if os.path.isfile('%sImagesUpload/.kernel/zImage*.ipk or %sImagesUpload/.kernel/zImage*.bin' % (getNeoLocation(), getNeoLocation())): - os.system('rm -f %sImagesUpload/.kernel/zImage*.ipk; rm -f %sImagesUpload/.kernel/zImage*.bin' % (getNeoLocation(),getNeoLocation())) + os.system('rm -f %sImagesUpload/.kernel/zImage*.ipk; rm -f %sImagesUpload/.kernel/zImage*.bin' % (getNeoLocation(), getNeoLocation())) if fileExists('/etc/issue.net'): try: @@ -507,7 +507,7 @@ class NeoBootInstallation(Screen): writefile.write(imagetype) writefile.close() elif fileExists('/etc/vtiversion.info'): - f = open("/etc/vtiversion.info",'r') + f = open("/etc/vtiversion.info", 'r') imagever = f.readline().strip().replace("Release ", " ") f.close() image = imagever @@ -515,7 +515,7 @@ class NeoBootInstallation(Screen): writefile.write(imagever) writefile.close() elif fileExists('/etc/bhversion'): - f = open("/etc/bhversion",'r') + f = open("/etc/bhversion", 'r') imagever = f.readline().strip() f.close() image = imagever diff --git a/NeoBoot/tmpfiles/runpy/arm_run.py b/NeoBoot/tmpfiles/runpy/arm_run.py index b5b5e5b..00cbc6f 100644 --- a/NeoBoot/tmpfiles/runpy/arm_run.py +++ b/NeoBoot/tmpfiles/runpy/arm_run.py @@ -2,7 +2,7 @@ #from __init__ import _ from Plugins.Extensions.NeoBoot.__init__ import _ -from Plugins.Extensions.NeoBoot.files.stbbranding import getSupportedTuners, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxHostName, getTunerModel, getNeoLocation, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 +from Plugins.Extensions.NeoBoot.files.stbbranding import getSupportedTuners, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxHostName, getTunerModel, getNeoLocation, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer from Screens.Screen import Screen diff --git a/NeoBoot/tmpfiles/runpy/duo4k_run.py b/NeoBoot/tmpfiles/runpy/duo4k_run.py index 79ded8f..eec3a81 100644 --- a/NeoBoot/tmpfiles/runpy/duo4k_run.py +++ b/NeoBoot/tmpfiles/runpy/duo4k_run.py @@ -2,7 +2,7 @@ #from __init__ import _ from Plugins.Extensions.NeoBoot.__init__ import _ -from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 +from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer from Screens.Screen import Screen diff --git a/NeoBoot/tmpfiles/runpy/duo4kse_run.py b/NeoBoot/tmpfiles/runpy/duo4kse_run.py index e5d0dd0..5b82ec5 100644 --- a/NeoBoot/tmpfiles/runpy/duo4kse_run.py +++ b/NeoBoot/tmpfiles/runpy/duo4kse_run.py @@ -2,7 +2,7 @@ #from __init__ import _ from Plugins.Extensions.NeoBoot.__init__ import _ -from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 +from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer from Screens.Screen import Screen diff --git a/NeoBoot/tmpfiles/runpy/mips_run.py b/NeoBoot/tmpfiles/runpy/mips_run.py index 3899ee6..e12657c 100644 --- a/NeoBoot/tmpfiles/runpy/mips_run.py +++ b/NeoBoot/tmpfiles/runpy/mips_run.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from Plugins.Extensions.NeoBoot.__init__ import _ -from Plugins.Extensions.NeoBoot.files.stbbranding import getSupportedTuners, getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 +from Plugins.Extensions.NeoBoot.files.stbbranding import getSupportedTuners, getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer from Screens.Screen import Screen diff --git a/NeoBoot/tmpfiles/runpy/vu4k_run.py b/NeoBoot/tmpfiles/runpy/vu4k_run.py index b1f3731..391e86a 100644 --- a/NeoBoot/tmpfiles/runpy/vu4k_run.py +++ b/NeoBoot/tmpfiles/runpy/vu4k_run.py @@ -3,7 +3,7 @@ #from __init__ import _ from Plugins.Extensions.NeoBoot.__init__ import _ #from __future__ import print_function -from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 +from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer from Screens.Screen import Screen diff --git a/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py b/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py index 5a2cbcc..6e503e6 100644 --- a/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py +++ b/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from Plugins.Extensions.NeoBoot.__init__ import _ -from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 +from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer from Screens.Screen import Screen diff --git a/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py b/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py index ef27cc3..fcc2dfa 100644 --- a/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py +++ b/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from Plugins.Extensions.NeoBoot.__init__ import _ -from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 +from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer from Screens.Screen import Screen diff --git a/NeoBoot/tmpfiles/runpy/zero4k_run.py b/NeoBoot/tmpfiles/runpy/zero4k_run.py index 037ba15..1763c14 100644 --- a/NeoBoot/tmpfiles/runpy/zero4k_run.py +++ b/NeoBoot/tmpfiles/runpy/zero4k_run.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from Plugins.Extensions.NeoBoot.__init__ import _ -from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2,getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 +from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer from Screens.Screen import Screen diff --git a/NeoBoot/ubi_reader_arm/ubi/block/__init__.py b/NeoBoot/ubi_reader_arm/ubi/block/__init__.py index 79dbf9b..73c8956 100644 --- a/NeoBoot/ubi_reader_arm/ubi/block/__init__.py +++ b/NeoBoot/ubi_reader_arm/ubi/block/__init__.py @@ -33,7 +33,7 @@ class description(object): def get_blocks_in_list(blocks, idx_list): - return {i:blocks[i] for i in idx_list} + return {i: blocks[i] for i in idx_list} def extract_blocks(ubi): diff --git a/NeoBoot/ubi_reader_mips/ubi/block/__init__.py b/NeoBoot/ubi_reader_mips/ubi/block/__init__.py index 79dbf9b..73c8956 100644 --- a/NeoBoot/ubi_reader_mips/ubi/block/__init__.py +++ b/NeoBoot/ubi_reader_mips/ubi/block/__init__.py @@ -33,7 +33,7 @@ class description(object): def get_blocks_in_list(blocks, idx_list): - return {i:blocks[i] for i in idx_list} + return {i: blocks[i] for i in idx_list} def extract_blocks(ubi):