Related: rhbz#1121678 --- anaconda | 12 ++++++------ dracut/parse-kickstart | 10 +++++----- dracut/python-deps | 4 ++-- pyanaconda/addons.py | 4 ++-- pyanaconda/anaconda_argparse.py | 2 +- pyanaconda/anaconda_log.py | 2 +- pyanaconda/bootloader.py | 18 +++++++++--------- pyanaconda/constants_text.py | 2 +- pyanaconda/exception.py | 2 +- pyanaconda/flags.py | 2 +- pyanaconda/geoloc.py | 2 +- pyanaconda/network.py | 6 +++--- pyanaconda/packaging/__init__.py | 6 +++--- pyanaconda/packaging/livepayload.py | 4 ++-- pyanaconda/packaging/rpmostreepayload.py | 4 ++-- pyanaconda/packaging/tarpayload.py | 2 +- pyanaconda/packaging/yumpayload.py | 2 +- pyanaconda/sitecustomize.py | 2 +- pyanaconda/threads.py | 2 +- pyanaconda/ui/common.py | 6 +++--- pyanaconda/ui/gui/__init__.py | 2 +- pyanaconda/ui/gui/spokes/__init__.py | 6 +++--- pyanaconda/ui/gui/spokes/custom.py | 2 +- pyanaconda/ui/gui/spokes/keyboard.py | 2 +- pyanaconda/ui/gui/spokes/lib/accordion.py | 6 +++--- pyanaconda/ui/gui/spokes/lib/cart.py | 4 ++-- pyanaconda/ui/gui/spokes/lib/detailederror.py | 2 +- pyanaconda/ui/gui/spokes/lib/resize.py | 2 +- pyanaconda/ui/gui/spokes/lib/summary.py | 4 ++-- pyanaconda/ui/gui/spokes/network.py | 2 +- pyanaconda/ui/gui/spokes/source.py | 2 +- pyanaconda/ui/gui/spokes/storage.py | 4 ++-- pyanaconda/ui/tui/simpleline/__init__.py | 4 ++-- pyanaconda/ui/tui/spokes/__init__.py | 6 +++--- scripts/anaconda-yum | 2 +- scripts/pyrc.py | 2 +- widgets/python/AnacondaWidgets.py | 2 +- 37 files changed, 74 insertions(+), 74 deletions(-)
diff --git a/anaconda b/anaconda index d82d1e8..ca24abd 100755 --- a/anaconda +++ b/anaconda @@ -401,7 +401,7 @@ def gtk_warning(title, reason): dialog.run() dialog.destroy()
-# pylint: disable-msg=W0621 +# pylint: disable=W0621 def check_memory(anaconda, opts, display_mode=None): reason_strict = _("%(product_name)s requires %(needed_ram)s MB of memory to install, but you only have " "%(total_ram)s MB on this machine.\n") @@ -440,7 +440,7 @@ def check_memory(anaconda, opts, display_mode=None): if needed_ram > total_ram: from snack import SnackScreen, ButtonChoiceWindow if opts.liveinst: - # pylint: disable-msg=W1201 + # pylint: disable=W1201 stdoutLog.warning(reason % reason_args) gtk_warning(livecd_title, reason % reason_args) else: @@ -463,7 +463,7 @@ def check_memory(anaconda, opts, display_mode=None): if needed_ram > total_ram: if opts.liveinst: reason += livecd_extra - # pylint: disable-msg=W1201 + # pylint: disable=W1201 stdoutLog.warning(reason % reason_args) title = livecd_title gtk_warning(title, reason % reason_args) @@ -471,12 +471,12 @@ def check_memory(anaconda, opts, display_mode=None): sys.exit(1) else: reason += nolivecd_extra - # pylint: disable-msg=W1201 + # pylint: disable=W1201 stdoutLog.warning(reason % reason_args) anaconda.displayMode = 't' time.sleep(2)
-# pylint: disable-msg=W0621 +# pylint: disable=W0621 def setupDisplay(anaconda, opts, addon_paths=None): from pyanaconda.ui.tui.simpleline import App from pyanaconda.ui.tui.spokes.askvnc import AskVNCSpoke @@ -740,7 +740,7 @@ if __name__ == "__main__":
# Allow a file to be loaded as early as possible try: - # pylint: disable-msg=F0401,W0611 + # pylint: disable=F0401,W0611 import updates_disk_hook except ImportError: pass diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart index 0235553..bcde770 100755 --- a/dracut/parse-kickstart +++ b/dracut/parse-kickstart @@ -20,7 +20,7 @@ from pykickstart.parser import KickstartParser, preprocessKickstart from pykickstart.sections import NullSection from pykickstart.version import returnClassForVersion, RHEL7 from pykickstart.errors import KickstartError -# pylint: disable-msg=W0401 +# pylint: disable=W0401 from pykickstart.constants import * from pykickstart import commands from collections import OrderedDict @@ -45,7 +45,7 @@ def read_cmdline(f): lines = open(f).readlines() except IOError: lines = [] - # pylint: disable-msg=W0621 + # pylint: disable=W0621 for line in lines: for arg in line.split(): k,_e,v = arg.partition("=") @@ -205,7 +205,7 @@ class DracutHandler(handlerclass): obj = handlerclass.dispatcher(self, args, lineno) # and execute any specified dracut_args cmd = args[0] - # pylint: disable-msg=E1101 + # pylint: disable=E1101 command = self.commands[cmd] if hasattr(command, "dracut_args"): log.debug("kickstart line %u: handling %s", lineno, cmd) @@ -250,7 +250,7 @@ def s390_settings(device): #NETTYPE="qeth" #OPTIONS="layer2=1 portname=FOOBAR portno=0" with open('/etc/ccw.conf') as f: - # pylint: disable-msg=W0621 + # pylint: disable=W0621 for line in f: if cfg['SUBCHANNELS'] in line: items = line.strip().split(',') @@ -262,7 +262,7 @@ def s390_settings(device):
def ksnet_to_dracut(args, lineno, net, bootdev=False): '''Translate the kickstart network data into dracut network data.''' - # pylint: disable-msg=W0621 + # pylint: disable=W0621 line = [] ip="" autoconf="" diff --git a/dracut/python-deps b/dracut/python-deps index 80d2f5e..5f09141 100755 --- a/dracut/python-deps +++ b/dracut/python-deps @@ -3,7 +3,7 @@
import os, sys from modulefinder import ModuleFinder -# pylint: disable-msg=W0401 +# pylint: disable=W0401 from distutils.sysconfig import *
sitedir = get_python_lib() @@ -19,7 +19,7 @@ def moduledir(pyfile): if modname not in ('..', 'site-packages'): return os.path.join(topdir, modname)
-# pylint: disable-msg=W0621 +# pylint: disable=W0621 def pyfiles(moddir): '''basically, "find $moddir -type f -name "*.py"''' for curdir, _dirs, files in os.walk(moddir): diff --git a/pyanaconda/addons.py b/pyanaconda/addons.py index 9c04f31..a7e1448 100644 --- a/pyanaconda/addons.py +++ b/pyanaconda/addons.py @@ -78,7 +78,7 @@ class AddonRegistry(object): return reduce(lambda acc,(id, addon): acc + str(addon), self.__dict__.iteritems(), "")
- # pylint: disable-msg=C0103 + # pylint: disable=C0103 def execute(self, storage, ksdata, instClass, users): """This method calls execute on all the registered addons.""" for v in self.__dict__.itervalues(): @@ -115,7 +115,7 @@ class AddonData(object): def __str__(self): return "%%addon %s\n%s%%end\n" % (self.name, self.content)
- # pylint: disable-msg=C0103 + # pylint: disable=C0103 def setup(self, storage, ksdata, instClass): """Make the changes to the install system.
diff --git a/pyanaconda/anaconda_argparse.py b/pyanaconda/anaconda_argparse.py index 68ff548..ac702dd 100644 --- a/pyanaconda/anaconda_argparse.py +++ b/pyanaconda/anaconda_argparse.py @@ -216,7 +216,7 @@ class AnacondaArgumentParser(ArgumentParser): setattr(namespace, option.dest, val) return namespace
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def parse_args(self, args=None, boot_cmdline=None): """ Like ArgumentParser.parse_args(), but also parses the boot cmdline. diff --git a/pyanaconda/anaconda_log.py b/pyanaconda/anaconda_log.py index fa6558e2..9b331e3 100644 --- a/pyanaconda/anaconda_log.py +++ b/pyanaconda/anaconda_log.py @@ -168,7 +168,7 @@ class AnacondaLog: syslogHandler.setLevel(logging.DEBUG) logr.addHandler(syslogHandler)
- # pylint: disable-msg=W0622 + # pylint: disable=W0622 def showwarning(self, message, category, filename, lineno, file=sys.stderr, line=None): """ Make sure messages sent through python's warnings module get logged. diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py index 7d17c6a..0167838 100644 --- a/pyanaconda/bootloader.py +++ b/pyanaconda/bootloader.py @@ -306,13 +306,13 @@ class BootLoader(object): # # disk list access # - # pylint: disable-msg=E0202 + # pylint: disable=E0202 @property def disk_order(self): """Potentially partial order for disks.""" return self._disk_order
- # pylint: disable-msg=E0102,E0202,E1101 + # pylint: disable=E0102,E0202,E1101 @disk_order.setter def disk_order(self, order): log.debug("new disk order: %s", order) @@ -338,7 +338,7 @@ class BootLoader(object): # # image list access # - # pylint: disable-msg=E0202 + # pylint: disable=E0202 @property def default(self): """The default image.""" @@ -347,7 +347,7 @@ class BootLoader(object):
return self._default_image
- # pylint: disable-msg=E0102,E0202,E1101 + # pylint: disable=E0102,E0202,E1101 @default.setter def default(self, image): if image not in self.images: @@ -758,7 +758,7 @@ class BootLoader(object): def has_windows(self, devices): return False
- # pylint: disable-msg=E0202 + # pylint: disable=E0202 @property def timeout(self): """Bootloader timeout in seconds.""" @@ -773,17 +773,17 @@ class BootLoader(object): """ Run additional bootloader checks """ return True
- # pylint: disable-msg=E0102,E0202,E1101 + # pylint: disable=E0102,E0202,E1101 @timeout.setter def timeout(self, seconds): self._timeout = seconds
- # pylint: disable-msg=E0202 + # pylint: disable=E0202 @property def update_only(self): return self._update_only
- # pylint: disable-msg=E0102,E0202,E1101 + # pylint: disable=E0102,E0202,E1101 @update_only.setter def update_only(self, value): if value and not self.can_update: @@ -1772,7 +1772,7 @@ class MacEFIGRUB(EFIGRUB):
# Inherit abstract methods from BootLoader -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class YabootBase(BootLoader): def write_config_password(self, config): if self.password: diff --git a/pyanaconda/constants_text.py b/pyanaconda/constants_text.py index b557229..89298f5 100644 --- a/pyanaconda/constants_text.py +++ b/pyanaconda/constants_text.py @@ -17,7 +17,7 @@ # along with this program. If not, see http://www.gnu.org/licenses/. #
-# pylint: disable-msg=W0401 +# pylint: disable=W0401 from pyanaconda.constants import * from pyanaconda.i18n import _, N_
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py index 360278d..1ae89f8 100644 --- a/pyanaconda/exception.py +++ b/pyanaconda/exception.py @@ -168,7 +168,7 @@ class AnacondaExceptionHandler(ExceptionHandler): # run kickstart traceback scripts (if necessary) try: kickstart.runTracebackScripts(anaconda.ksdata.scripts) - # pylint: disable-msg=W0702 + # pylint: disable=W0702 except: pass
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py index 72c47eb..5833119 100644 --- a/pyanaconda/flags.py +++ b/pyanaconda/flags.py @@ -29,7 +29,7 @@ log = logging.getLogger("anaconda") # A lot of effort, but it only allows a limited set of flags to be referenced class Flags(object): def __setattr__(self, attr, val): - # pylint: disable-msg=E1101 + # pylint: disable=E1101 if attr not in self.__dict__ and not self._in_init: raise AttributeError(attr) else: diff --git a/pyanaconda/geoloc.py b/pyanaconda/geoloc.py index e20887f..c8eba4e 100644 --- a/pyanaconda/geoloc.py +++ b/pyanaconda/geoloc.py @@ -418,7 +418,7 @@ class GeolocationBackend(object): self._refresh() log.info("Geolocation lookup finished in %1.1f seconds", time.time() - start_time) - # pylint: disable-msg=W0703 + # pylint: disable=W0703 except Exception as e: message = "GeoIP lookup ended with exception" message += "\n%s" % e diff --git a/pyanaconda/network.py b/pyanaconda/network.py index 4630aba..e9b6ff1 100644 --- a/pyanaconda/network.py +++ b/pyanaconda/network.py @@ -287,7 +287,7 @@ def dumpMissingDefaultIfcfgs(): continue from pyanaconda.kickstart import AnacondaKSHandler handler = AnacondaKSHandler() - # pylint: disable-msg=E1101 + # pylint: disable=E1101 network_data = handler.NetworkData(onboot=False, ipv6="auto") add_connection_for_ksdata(network_data, devname) rv.append(devname) @@ -736,7 +736,7 @@ def ifcfg_to_ksdata(ifcfg, devname): if bridgeopts: kwargs["bridgeopts"] = ",".join(bridgeopts)
- # pylint: disable-msg=E1101 + # pylint: disable=E1101 nd = handler.NetworkData(**kwargs)
# teaming @@ -754,7 +754,7 @@ def ifcfg_to_ksdata(ifcfg, devname): def hostname_ksdata(hostname): from pyanaconda.kickstart import AnacondaKSHandler handler = AnacondaKSHandler() - # pylint: disable-msg=E1101 + # pylint: disable=E1101 return handler.NetworkData(hostname=hostname, bootProto="")
def find_ifcfg_file_of_device(devname, root_path=""): diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py index b2c92e8..0ec7406 100644 --- a/pyanaconda/packaging/__init__.py +++ b/pyanaconda/packaging/__init__.py @@ -678,19 +678,19 @@ class Payload(object): self._copyDriverDiskFiles()
# Inherit abstract methods from Payload -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class ImagePayload(Payload): """ An ImagePayload installs an OS image to the target system. """ pass
# Inherit abstract methods from ImagePayload -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class ArchivePayload(ImagePayload): """ An ArchivePayload unpacks source archives onto the target system. """ pass
# Inherit abstract methods from Payload -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class PackagePayload(Payload): """ A PackagePayload installs a set of packages onto the target system. """
diff --git a/pyanaconda/packaging/livepayload.py b/pyanaconda/packaging/livepayload.py index f82bfb3..5cb6299 100644 --- a/pyanaconda/packaging/livepayload.py +++ b/pyanaconda/packaging/livepayload.py @@ -58,7 +58,7 @@ from pyanaconda.threads import threadMgr, AnacondaThread from pyanaconda.i18n import _
# Inherit abstract methods from ImagePayload -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class LiveImagePayload(ImagePayload): """ A LivePayload copies the source image onto the target system. """ def __init__(self, *args, **kwargs): @@ -223,7 +223,7 @@ class URLGrabberProgress(object): {"url" : self.url, "pct" : 100})
# Inherit abstract methods from LiveImagePayload -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class LiveImageKSPayload(LiveImagePayload): """ Install using a live filesystem image from the network """ def __init__(self, *args, **kwargs): diff --git a/pyanaconda/packaging/rpmostreepayload.py b/pyanaconda/packaging/rpmostreepayload.py index d43b70f..9725a30 100644 --- a/pyanaconda/packaging/rpmostreepayload.py +++ b/pyanaconda/packaging/rpmostreepayload.py @@ -40,7 +40,7 @@ from pyanaconda.packaging import ArchivePayload, PayloadInstallError import pyanaconda.errors as errors
# Inherit abstract methods from ArchivePayload -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class RPMOSTreePayload(ArchivePayload): """ A RPMOSTreePayload deploys a tree (possibly with layered packages) onto the target system. """ def __init__(self, data): @@ -123,7 +123,7 @@ class RPMOSTreePayload(ArchivePayload): progressQ.send_message(_("Starting pull of %(branchName)s from %(source)s") % \ {"branchName": ostreesetup.ref, "source": ostreesetup.remote})
- # pylint: disable-msg=E1120 + # pylint: disable=E1120 progress = OSTree.AsyncProgress.new() progress.connect('changed', self._pullProgressCb)
diff --git a/pyanaconda/packaging/tarpayload.py b/pyanaconda/packaging/tarpayload.py index 90c1138..a22f557 100644 --- a/pyanaconda/packaging/tarpayload.py +++ b/pyanaconda/packaging/tarpayload.py @@ -40,7 +40,7 @@ from pyanaconda import iutil from pyanaconda.packaging import ArchivePayload, PayloadError
# TarPayload is not yet fully implemented. -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class TarPayload(ArchivePayload): """ A TarPayload unpacks a single tar archive onto the target system. """ def __init__(self, data): diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py index 5529e86..4b038ec 100644 --- a/pyanaconda/packaging/yumpayload.py +++ b/pyanaconda/packaging/yumpayload.py @@ -1727,7 +1727,7 @@ reposdir=%s # all yumvars and writing out the expanded pairs to the conf yb = yum.YumBase() yum_conf_path = "/etc/yum.conf" - # pylint: disable-msg=W9910 + # pylint: disable=W9910 yb.preconf.fn = iutil.getSysroot() + yum_conf_path yb.conf.multilib_policy = "all"
diff --git a/pyanaconda/sitecustomize.py b/pyanaconda/sitecustomize.py index f2bcd10..c88ef6a 100644 --- a/pyanaconda/sitecustomize.py +++ b/pyanaconda/sitecustomize.py @@ -19,5 +19,5 @@ #
import sys -# pylint: disable-msg=E1101 +# pylint: disable=E1101 sys.setdefaultencoding('utf-8') diff --git a/pyanaconda/threads.py b/pyanaconda/threads.py index 3768452..ef8158f 100644 --- a/pyanaconda/threads.py +++ b/pyanaconda/threads.py @@ -209,7 +209,7 @@ class AnacondaThread(threading.Thread): log.info("Running Thread: %s (%s)", self.name, self.ident) try: threading.Thread.run(self, *args, **kwargs) - # pylint: disable-msg=W0702 + # pylint: disable=W0702 except: threadMgr.set_error(self.name, *sys.exc_info()) if self._fatal: diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py index 7568965..2b121bb 100644 --- a/pyanaconda/ui/common.py +++ b/pyanaconda/ui/common.py @@ -346,7 +346,7 @@ class Spoke(UIObject): raise NotImplementedError
# Inherit abstract methods from Spoke -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class NormalSpoke(Spoke): """A NormalSpoke is a Spoke subclass that is displayed when the user selects something on a Hub. This is what most Spokes in anaconda will @@ -399,7 +399,7 @@ class NormalSpoke(Spoke): return True
# Inherit abstract methods from NormalSpoke -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class StandaloneSpoke(NormalSpoke): """A StandaloneSpoke is a Spoke subclass that is displayed apart from any Hub. It is suitable to be used as a Welcome screen. @@ -437,7 +437,7 @@ class StandaloneSpoke(NormalSpoke): NormalSpoke.__init__(self, data, storage, payload, instclass)
# Inherit abstract methods from Spoke -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class PersonalizationSpoke(Spoke): """A PersonalizationSpoke is a Spoke subclass that is displayed when the user selects something on the Hub during package installation. diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py index 08f6bc8..3f0991c 100644 --- a/pyanaconda/ui/gui/__init__.py +++ b/pyanaconda/ui/gui/__init__.py @@ -317,7 +317,7 @@ class ErrorDialog(GUIObject): mainWidgetName = "errorDialog" uiFile = "main.glade"
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def refresh(self, msg): buf = self.builder.get_object("errorTextBuffer") buf.set_text(msg, -1) diff --git a/pyanaconda/ui/gui/spokes/__init__.py b/pyanaconda/ui/gui/spokes/__init__.py index be1539e..9703440 100644 --- a/pyanaconda/ui/gui/spokes/__init__.py +++ b/pyanaconda/ui/gui/spokes/__init__.py @@ -65,7 +65,7 @@ class Spoke(GUIObject): pass
# Inherit abstract methods from common.StandaloneSpoke -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class StandaloneSpoke(Spoke, common.StandaloneSpoke):
handles_autostep = True @@ -92,7 +92,7 @@ class StandaloneSpoke(Spoke, common.StandaloneSpoke): gtk_call_once(self.window.emit, "continue-clicked")
# Inherit abstract methods from common.NormalSpoke -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class NormalSpoke(Spoke, common.NormalSpoke): def __init__(self, data, storage, payload, instclass): Spoke.__init__(self, data) @@ -113,7 +113,7 @@ class NormalSpoke(Spoke, common.NormalSpoke): Gtk.main_quit()
# Inherit abstract methods from common.PersonalizationSpoke -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class PersonalizationSpoke(Spoke, common.PersonalizationSpoke): def __init__(self, data, storage, payload, instclass): Spoke.__init__(self, data) diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py index cc302db..9daf9d1 100644 --- a/pyanaconda/ui/gui/spokes/custom.py +++ b/pyanaconda/ui/gui/spokes/custom.py @@ -484,7 +484,7 @@ class ConfirmDeleteDialog(GUIObject): def on_delete_confirm_clicked(self, button, *args): self.window.destroy()
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def refresh(self, mountpoint, device, rootName, snapshots=False): GUIObject.refresh(self) label = self.builder.get_object("confirmLabel") diff --git a/pyanaconda/ui/gui/spokes/keyboard.py b/pyanaconda/ui/gui/spokes/keyboard.py index 6329069..da49d27 100644 --- a/pyanaconda/ui/gui/spokes/keyboard.py +++ b/pyanaconda/ui/gui/spokes/keyboard.py @@ -498,7 +498,7 @@ class KeyboardSpoke(NormalSpoke): else: lay_var_spec = layout
- # pylint: disable-msg=E1120 + # pylint: disable=E1120 dialog = Gkbd.KeyboardDrawing.dialog_new() Gkbd.KeyboardDrawing.dialog_set_layout(dialog, self._xkl_wrapper.configreg, lay_var_spec) diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py index a340ee5..439f83a 100644 --- a/pyanaconda/ui/gui/spokes/lib/accordion.py +++ b/pyanaconda/ui/gui/spokes/lib/accordion.py @@ -178,7 +178,7 @@ class Page(Gtk.Box): selector.set_margin_bottom(6) self.members.append(selector)
- # pylint: disable-msg=E1101 + # pylint: disable=E1101 if self._mountpointType(selector.props.mountpoint) == DATA_DEVICE: self._dataBox.add(selector) else: @@ -223,7 +223,7 @@ class Page(Gtk.Box): class UnknownPage(Page): def __init__(self, title): # For this type of page, there's only one place to store members. - # pylint: disable-msg=W0231,W0233 + # pylint: disable=W0231,W0233 Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL, spacing=6) self.members = [] self.pageTitle = title @@ -248,7 +248,7 @@ class UnknownPage(Page): # is created, it will be removed and replaced with a Page for it. class CreateNewPage(Page): def __init__(self, title, createClickedCB, autopartTypeChangedCB, partitionsToReuse=True): - # pylint: disable-msg=W0231,W0233 + # pylint: disable=W0231,W0233 Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL, spacing=6) self.members = [] self.pageTitle = title diff --git a/pyanaconda/ui/gui/spokes/lib/cart.py b/pyanaconda/ui/gui/spokes/lib/cart.py index 72e28ad..e72704a 100644 --- a/pyanaconda/ui/gui/spokes/lib/cart.py +++ b/pyanaconda/ui/gui/spokes/lib/cart.py @@ -52,7 +52,7 @@ class SelectedDisksDialog(GUIObject): self._set_button = self.builder.get_object("set_as_boot_button") self._remove_button = self.builder.get_object("remove_button")
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def initialize(self, disks, free, showRemove=True, setBoot=True): self._previousID = None
@@ -97,7 +97,7 @@ class SelectedDisksDialog(GUIObject): row[IS_BOOT_COL] = True break
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def refresh(self, disks, free, showRemove=True, setBoot=True): super(SelectedDisksDialog, self).refresh()
diff --git a/pyanaconda/ui/gui/spokes/lib/detailederror.py b/pyanaconda/ui/gui/spokes/lib/detailederror.py index 613fef8..aacd930 100644 --- a/pyanaconda/ui/gui/spokes/lib/detailederror.py +++ b/pyanaconda/ui/gui/spokes/lib/detailederror.py @@ -67,7 +67,7 @@ class DetailedErrorDialog(GUIObject): if label: self.builder.get_object("detailedLabel").set_text(label)
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def refresh(self, msg): buf = self.builder.get_object("detailedTextBuffer") buf.set_text(msg, -1) diff --git a/pyanaconda/ui/gui/spokes/lib/resize.py b/pyanaconda/ui/gui/spokes/lib/resize.py index 69a48f9..2edba6b 100644 --- a/pyanaconda/ui/gui/spokes/lib/resize.py +++ b/pyanaconda/ui/gui/spokes/lib/resize.py @@ -297,7 +297,7 @@ class ResizeDialog(GUIObject): def _update_reclaim_button(self, got): self._resizeButton.set_sensitive(got+self._initialFreeSpace >= self.payload.spaceRequired)
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def refresh(self, disks): super(ResizeDialog, self).refresh()
diff --git a/pyanaconda/ui/gui/spokes/lib/summary.py b/pyanaconda/ui/gui/spokes/lib/summary.py index 1e07dc4..16f7ab7 100644 --- a/pyanaconda/ui/gui/spokes/lib/summary.py +++ b/pyanaconda/ui/gui/spokes/lib/summary.py @@ -36,7 +36,7 @@ class ActionSummaryDialog(GUIObject): GUIObject.__init__(self, data) self._store = self.builder.get_object("actionStore")
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def initialize(self, actions): for (i, action) in enumerate(actions, start=1): mountpoint = "" @@ -67,7 +67,7 @@ class ActionSummaryDialog(GUIObject): mountpoint, serial])
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def refresh(self, actions): GUIObject.refresh(self)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py index ad19ddc..24020cc 100644 --- a/pyanaconda/ui/gui/spokes/network.py +++ b/pyanaconda/ui/gui/spokes/network.py @@ -349,7 +349,7 @@ class NetworkControlBox(GObject.GObject): # to prevent UI update signals races self._updating_device = False
- # pylint: disable-msg=E1120 + # pylint: disable=E1120 self.client = NMClient.Client.new()
# devices list diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 5c9295c..74bf2a8 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -236,7 +236,7 @@ class IsoChooser(GUIObject): GUIObject.__init__(self, data) self._chooser = self.builder.get_object("isoChooser")
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def refresh(self, currentFile=""): GUIObject.refresh(self) self._chooser = self.builder.get_object("isoChooser") diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py index 890443c..874e3e3 100644 --- a/pyanaconda/ui/gui/spokes/storage.py +++ b/pyanaconda/ui/gui/spokes/storage.py @@ -157,7 +157,7 @@ class InstallOptions1Dialog(InstallOptionsDialogBase): self.disk_free_label.set_text(str(disk_free)) self.fs_free_label.set_text(str(fs_free))
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def refresh(self, required_space, auto_swap, disk_free, fs_free): sw_text = self._get_sw_needs_text(required_space, auto_swap) label_text = _("%s The disks you've selected have the following " @@ -192,7 +192,7 @@ class InstallOptions2Dialog(InstallOptionsDialogBase): self.disk_free_label.set_text(str(disk_free)) self.fs_free_label.set_text(str(fs_free))
- # pylint: disable-msg=W0221 + # pylint: disable=W0221 def refresh(self, required_space, auto_swap, disk_free, fs_free): sw_text = self._get_sw_needs_text(required_space, auto_swap) label_text = (_("%(sw_text)s You don't have enough space available to install " diff --git a/pyanaconda/ui/tui/simpleline/__init__.py b/pyanaconda/ui/tui/simpleline/__init__.py index 2c715e2..50ae474 100644 --- a/pyanaconda/ui/tui/simpleline/__init__.py +++ b/pyanaconda/ui/tui/simpleline/__init__.py @@ -19,7 +19,7 @@ # Red Hat Author(s): Martin Sivak msivak@redhat.com #
-# pylint: disable-msg=W0401 +# pylint: disable=W0401 from pyanaconda.ui.tui.simpleline.base import * -# pylint: disable-msg=W0401 +# pylint: disable=W0401 from pyanaconda.ui.tui.simpleline.widgets import * diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py index 1a6b718..5e121ca 100644 --- a/pyanaconda/ui/tui/spokes/__init__.py +++ b/pyanaconda/ui/tui/spokes/__init__.py @@ -32,7 +32,7 @@ __all__ = ["TUISpoke", "EditTUISpoke", "EditTUIDialog", "EditTUISpokeEntry", "St "collect_spokes", "collect_categories"]
# Inherit abstract methods from Spoke -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class TUISpoke(TUIObject, tui.Widget, Spoke): """Base TUI Spoke class implementing the pyanaconda.ui.common.Spoke API. It also acts as a Widget so we can easily add it to Hub, where is shows @@ -91,7 +91,7 @@ class NormalTUISpoke(TUISpoke, NormalSpoke): EditTUISpokeEntry = namedtuple("EditTUISpokeEntry", ["title", "attribute", "aux", "visible"])
# Inherit abstract methods from NormalTUISpoke -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class EditTUIDialog(NormalTUISpoke): """Spoke/dialog used to read new value of textual or password data"""
@@ -162,7 +162,7 @@ class OneShotEditTUIDialog(EditTUIDialog): return ret
# Inherit abstract methods from NormalTUISpoke -# pylint: disable-msg=W0223 +# pylint: disable=W0223 class EditTUISpoke(NormalTUISpoke): """Spoke with declarative semantics, it contains a list of titles, attribute names and regexps diff --git a/scripts/anaconda-yum b/scripts/anaconda-yum index 6a8a181..d451f16 100755 --- a/scripts/anaconda-yum +++ b/scripts/anaconda-yum @@ -1,5 +1,5 @@ #!/usr/bin/python -# pylint: disable-msg=W9910 +# pylint: disable=W9910 # # Copyright (C) 2013 Red Hat, Inc. # diff --git a/scripts/pyrc.py b/scripts/pyrc.py index 641818a..6c907a8 100644 --- a/scripts/pyrc.py +++ b/scripts/pyrc.py @@ -23,6 +23,6 @@ try: readline.parse_and_bind("tab: complete") del rlcompleter del readline -# pylint: disable-msg=W0702 +# pylint: disable=W0702 except: pass diff --git a/widgets/python/AnacondaWidgets.py b/widgets/python/AnacondaWidgets.py index 3046f37..f3243b1 100644 --- a/widgets/python/AnacondaWidgets.py +++ b/widgets/python/AnacondaWidgets.py @@ -77,7 +77,7 @@ class DiskOverview(Anaconda.DiskOverview): DiskOverview = override(DiskOverview) __all__.append('DiskOverview')
-# pylint: disable-msg=W0232 +# pylint: disable=W0232 class TimezoneMap(Anaconda.TimezoneMap): def set_timezone(self, timezone, no_signal=False): Anaconda.TimezoneMap.set_timezone(self, timezone, no_signal)
Related: rhbz#1121678 --- pyanaconda/anaconda_log.py | 3 +-- pyanaconda/rescue.py | 2 +- pyanaconda/ui/__init__.py | 4 ++-- pyanaconda/ui/gui/spokes/lib/passphrase.py | 2 +- pyanaconda/ui/gui/spokes/password.py | 4 ++-- pyanaconda/ui/gui/spokes/user.py | 4 ++-- pyanaconda/ui/tui/simpleline/base.py | 8 ++++---- pyanaconda/ui/tui/spokes/__init__.py | 2 +- pyanaconda/vnc.py | 6 +++--- scripts/makebumpver | 2 +- tests/pylint/runpylint.sh | 3 ++- 11 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/pyanaconda/anaconda_log.py b/pyanaconda/anaconda_log.py index 9b331e3..90d2909 100644 --- a/pyanaconda/anaconda_log.py +++ b/pyanaconda/anaconda_log.py @@ -176,8 +176,7 @@ class AnacondaLog: The warnings mechanism is used by some libraries we use, notably pykickstart. """ - self.anaconda_logger.warning("%s" % warnings.formatwarning( - message, category, filename, lineno, line)) + self.anaconda_logger.warning(warnings.formatwarning(message, category, filename, lineno, line))
def restartSyslog(self): os.system("systemctl restart rsyslog.service") diff --git a/pyanaconda/rescue.py b/pyanaconda/rescue.py index 934122e..faad3c5 100644 --- a/pyanaconda/rescue.py +++ b/pyanaconda/rescue.py @@ -430,7 +430,7 @@ def doRescue(intf, rescue_mount, ksdata): pass except (ValueError, LookupError, SyntaxError, NameError): raise - except Exception as e: + except Exception as e: # pylint: disable=W0703 log.error("doRescue caught exception: %s", e) if flags.automatedInstall: log.error("An error occurred trying to mount some or all of your system") diff --git a/pyanaconda/ui/__init__.py b/pyanaconda/ui/__init__.py index c60698d..2cbf76a 100644 --- a/pyanaconda/ui/__init__.py +++ b/pyanaconda/ui/__init__.py @@ -163,10 +163,10 @@ class UserInterface(object):
actionClasses = [] for hub in hubs: - actionClasses.extend(sorted(filter(lambda obj: getattr(obj, "preForHub", None) == hub, spokes), + actionClasses.extend(sorted(filter(lambda obj, h=hub: getattr(obj, "preForHub", None) == h, spokes), key=lambda obj: obj.priority)) actionClasses.append(hub) - actionClasses.extend(sorted(filter(lambda obj: getattr(obj, "postForHub", None) == hub, spokes), + actionClasses.extend(sorted(filter(lambda obj, h=hub: getattr(obj, "postForHub", None) == h, spokes), key=lambda obj: obj.priority))
return actionClasses diff --git a/pyanaconda/ui/gui/spokes/lib/passphrase.py b/pyanaconda/ui/gui/spokes/lib/passphrase.py index 369a998..226159b 100644 --- a/pyanaconda/ui/gui/spokes/lib/passphrase.py +++ b/pyanaconda/ui/gui/spokes/lib/passphrase.py @@ -104,7 +104,7 @@ class PassphraseDialog(GUIObject): try: strength = self._pwq.check(passphrase, None, None) except pwquality.PWQError as e: - self._pwq_error = e[1] + self._pwq_error = e.message
if strength < 50: val = 1 diff --git a/pyanaconda/ui/gui/spokes/password.py b/pyanaconda/ui/gui/spokes/password.py index 0ae2586..72ecc96 100644 --- a/pyanaconda/ui/gui/spokes/password.py +++ b/pyanaconda/ui/gui/spokes/password.py @@ -117,7 +117,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke): strength = checkPassword(self.pw.get_text()) _pwq_error = None except PWQError as e: - _pwq_error = e[1] + _pwq_error = e.message strength = 0
if strength < 50: @@ -183,7 +183,7 @@ class PasswordSpoke(FirstbootSpokeMixIn, NormalSpoke): pass else: self._error = _("You have provided a weak password: %s. " - " Press Done again to use anyway.") % e[1] + " Press Done again to use anyway.") % e.message self._oldweak = pw return False
diff --git a/pyanaconda/ui/gui/spokes/user.py b/pyanaconda/ui/gui/spokes/user.py index 2da338e..e40b413 100644 --- a/pyanaconda/ui/gui/spokes/user.py +++ b/pyanaconda/ui/gui/spokes/user.py @@ -351,7 +351,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke): strength = self._pwq.check(self.pw.get_text(), None, None) _pwq_error = None except pwquality.PWQError as e: - _pwq_error = e[1] + _pwq_error = e.message strength = 0
if strength < 50: @@ -426,7 +426,7 @@ class UserSpoke(FirstbootSpokeMixIn, NormalSpoke): pass else: self._error = _("You have provided a weak password: %s. " - " Press Done again to use anyway.") % e[1] + " Press Done again to use anyway.") % e.message self._oldweak = pw return False
diff --git a/pyanaconda/ui/tui/simpleline/base.py b/pyanaconda/ui/tui/simpleline/base.py index d737ede..8a17e72 100644 --- a/pyanaconda/ui/tui/simpleline/base.py +++ b/pyanaconda/ui/tui/simpleline/base.py @@ -284,7 +284,7 @@ class App(object): self._redraw = False except ExitMainLoop: raise - except Exception: + except Exception: # pylint: disable=W0703 send_exception(self.queue, sys.exc_info()) return False
@@ -343,7 +343,7 @@ class App(object): prompt = last_screen.prompt(self._screens[-1][1]) except ExitMainLoop: raise - except Exception: + except Exception: # pylint: disable=W0703 send_exception(self.queue, sys.exc_info()) continue
@@ -400,7 +400,7 @@ class App(object): handler(event, data) except ExitMainLoop: raise - except Exception: + except Exception: # pylint: disable=W0703 send_exception(self.queue, sys.exc_info())
def raw_input(self, prompt, hidden=False): @@ -441,7 +441,7 @@ class App(object): return True except ExitMainLoop: raise - except Exception: + except Exception: # pylint: disable=W0703 send_exception(self.queue, sys.exc_info()) return False
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py index 5e121ca..84f1c3c 100644 --- a/pyanaconda/ui/tui/spokes/__init__.py +++ b/pyanaconda/ui/tui/spokes/__init__.py @@ -126,7 +126,7 @@ class EditTUIDialog(NormalTUISpoke): if strength < 50: error = _("The password you have provided is weak") except PWQError as e: - error = e[1] + error = e.message if error: error = _("You have provided a weak password: %s. ") % error error += _("\nWould you like to use it anyway?") diff --git a/pyanaconda/vnc.py b/pyanaconda/vnc.py index d6cd3e0..2ae8901 100644 --- a/pyanaconda/vnc.py +++ b/pyanaconda/vnc.py @@ -176,7 +176,7 @@ class VncServer: sys.exit(1) self.log.error(P_("Giving up attempting to connect after %d try!\n", "Giving up attempting to connect after %d tries!\n", - maxTries) % (maxTries,)) + maxTries), maxTries) return False
def VNCListen(self): @@ -185,11 +185,11 @@ class VncServer: We dont really have to do anything for the server to listen :) """ if self.connxinfo != None: - self.log.info(_("Please manually connect your vnc client to %s to begin the install.") % (self.connxinfo,)) + self.log.info(_("Please manually connect your vnc client to %s to begin the install."), self.connxinfo) else: self.log.info(_("Please manually connect your vnc client to <IP ADDRESS>:%s " "to begin the install. Switch to the shell (Ctrl-B 2) and " - "run 'ip addr' to find the <IP ADDRESS>.") % (self.display,)) + "run 'ip addr' to find the <IP ADDRESS>."), self.display)
def startServer(self): self.log.info(_("Starting VNC...")) diff --git a/scripts/makebumpver b/scripts/makebumpver index 29822d9..4ab94c4 100755 --- a/scripts/makebumpver +++ b/scripts/makebumpver @@ -242,7 +242,7 @@ class MakeBumpVer:
if self.ignore and self.ignore != '': for commit in self.ignore.split(','): - lines = filter(lambda x: not x.startswith(commit), lines) + lines = filter(lambda x, c=commit: not x.startswith(c), lines)
rpm_log = [] bad_bump = False diff --git a/tests/pylint/runpylint.sh b/tests/pylint/runpylint.sh index b720520..3615052 100755 --- a/tests/pylint/runpylint.sh +++ b/tests/pylint/runpylint.sh @@ -60,6 +60,7 @@ export NON_STRICT_OPTIONS="--disable=W0212" export DISABLED_ERR_OPTIONS="--disable=E1103"
# W0110 - map/filter on lambda could be replaced by comprehension +# W0123 - Use of eval # W0141 - Used builtin function %r # W0142 - Used * or ** magic # W0511 - Used when a warning note as FIXME or XXX is detected. @@ -69,7 +70,7 @@ export DISABLED_ERR_OPTIONS="--disable=E1103" # I0011 - Locally disabling %s (i.e., pylint: disable) # I0012 - Locally enabling %s (i.e., pylint: enable) # I0013 - Ignoring entire file (i.e., pylint: skip-file) -export DISABLED_WARN_OPTIONS="--disable=W0110,W0141,W0142,W0511,W0603,W0613,W0614,I0011,I0012,I0013" +export DISABLED_WARN_OPTIONS="--disable=W0110,W0123,W0141,W0142,W0511,W0603,W0613,W0614,I0011,I0012,I0013"
usage () { echo "usage: `basename $0` [--strict] [--help] [files...]"
Ack to these 2 as well.
anaconda-patches@lists.fedorahosted.org