[PATCH] Use descriptive pylint messages instead of numbers.

Chris Lumens clumens at redhat.com
Mon Apr 21 18:07:28 UTC 2014


---
 anaconda                                               |  8 ++++----
 dracut/parse-kickstart                                 | 10 +++++-----
 dracut/python-deps                                     |  4 ++--
 pyanaconda/anaconda_log.py                             |  2 +-
 pyanaconda/anaconda_optparse.py                        |  2 +-
 pyanaconda/bootloader.py                               |  2 +-
 pyanaconda/constants.py                                |  2 +-
 pyanaconda/constants_text.py                           |  2 +-
 pyanaconda/exception.py                                |  2 +-
 pyanaconda/flags.py                                    |  2 +-
 pyanaconda/network.py                                  |  4 ++--
 pyanaconda/packaging/__init__.py                       |  4 ++--
 pyanaconda/packaging/tarpayload.py                     |  2 +-
 pyanaconda/packaging/yumpayload.py                     |  2 +-
 pyanaconda/sitecustomize.py                            |  2 +-
 pyanaconda/threads.py                                  |  2 +-
 pyanaconda/ui/common.py                                |  4 ++--
 pyanaconda/ui/gui/__init__.py                          |  2 +-
 pyanaconda/ui/gui/spokes/__init__.py                   |  4 ++--
 pyanaconda/ui/gui/spokes/custom.py                     |  2 +-
 pyanaconda/ui/gui/spokes/lib/accordion.py              |  6 +++---
 pyanaconda/ui/gui/spokes/lib/cart.py                   |  6 +++---
 pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py |  2 +-
 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/software.py                   |  4 ++--
 pyanaconda/ui/gui/spokes/source.py                     |  6 +++---
 pyanaconda/ui/gui/spokes/storage.py                    |  4 ++--
 pyanaconda/ui/helpers.py                               |  2 +-
 pyanaconda/ui/tui/simpleline/__init__.py               |  4 ++--
 pyanaconda/ui/tui/spokes/__init__.py                   |  6 +++---
 pyanaconda/ui/tui/spokes/source.py                     |  4 ++--
 scripts/anaconda-yum                                   |  4 ++--
 tests/glade/markup/check_markup.py                     |  2 +-
 tests/gui/outside/__init__.py                          |  8 ++++----
 tests/pyanaconda_tests/iutil_test.py                   | 10 +++++-----
 tests/pyanaconda_tests/timezone_test.py                |  4 ++--
 tests/pylint/intl.py                                   |  2 +-
 tests/pylint/markup.py                                 |  4 ++--
 tests/pylint/preconf.py                                |  2 +-
 tests/storage/cases/__init__.py                        |  4 ++--
 43 files changed, 79 insertions(+), 79 deletions(-)

diff --git a/anaconda b/anaconda
index 33dbb30..2f0256e 100755
--- a/anaconda
+++ b/anaconda
@@ -427,7 +427,7 @@ def gtk_warning(title, reason):
     dialog.run()
     dialog.destroy()
 
-# pylint: disable=W0621
+# pylint: disable=redefined-outer-name
 def check_memory(anaconda, options, 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")
@@ -496,11 +496,11 @@ def check_memory(anaconda, options, display_mode=None):
                 time.sleep(2)
 
 def startDebugger(signum, frame):
-    # pylint: disable=F0401
+    # pylint: disable=import-error
     import epdb
     epdb.serve(skip=1)
 
-# pylint: disable=W0621
+# pylint: disable=redefined-outer-name
 def setupDisplay(anaconda, options, addons=None):
     from pyanaconda.ui.tui.simpleline import App
     from pyanaconda.ui.tui.spokes.askvnc import AskVNCSpoke
@@ -748,7 +748,7 @@ if __name__ == "__main__":
 
     # Allow a file to be loaded as early as possible
     try:
-        # pylint: disable=F0401,W0611
+        # pylint: disable=import-error,unused-import
         import updates_disk_hook
     except ImportError:
         pass
diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index 907c7df..ab1f57a 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -19,7 +19,7 @@ import glob
 from pykickstart.parser import KickstartParser, preprocessKickstart
 from pykickstart.version import returnClassForVersion
 from pykickstart.errors import KickstartError
-# pylint: disable=W0401
+# pylint: disable=wildcard-import
 from pykickstart.constants import *
 from pykickstart import commands
 from collections import OrderedDict
@@ -44,7 +44,7 @@ def read_cmdline(f):
         lines = open(f).readlines()
     except IOError:
         lines = []
-    # pylint: disable=W0621
+    # pylint: disable=redefined-outer-name
     for line in lines:
         for arg in line.split():
             k,_e,v = arg.partition("=")
@@ -196,7 +196,7 @@ class DracutHandler(handlerclass):
         cmd = args[0]
         # the commands member is implemented by the class returned
         # by returnClassForVersion
-        # pylint: disable=E1101
+        # pylint: disable=no-member
         command = self.commands[cmd]
         if hasattr(command, "dracut_args"):
             log.debug("kickstart line %u: handling %s", lineno, cmd)
@@ -241,7 +241,7 @@ def s390_settings(device):
     #NETTYPE="qeth"
     #OPTIONS="layer2=1 portname=FOOBAR portno=0"
     with open('/etc/ccw.conf') as f:
-        # pylint: disable=W0621
+        # pylint: disable=redefined-outer-name
         for line in f:
             if cfg['SUBCHANNELS'] in line:
                 items = line.strip().split(',')
@@ -253,7 +253,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=W0621
+    # pylint: disable=redefined-outer-name
     line = []
     ip=""
     autoconf=""
diff --git a/dracut/python-deps b/dracut/python-deps
index 5f09141..a2dabca 100755
--- a/dracut/python-deps
+++ b/dracut/python-deps
@@ -3,7 +3,7 @@
 
 import os, sys
 from modulefinder import ModuleFinder
-# pylint: disable=W0401
+# pylint: disable=wildcard-import
 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=W0621
+# pylint: disable=redefined-outer-name
 def pyfiles(moddir):
     '''basically, "find $moddir -type f -name "*.py"'''
     for curdir, _dirs, files in os.walk(moddir):
diff --git a/pyanaconda/anaconda_log.py b/pyanaconda/anaconda_log.py
index afdba23..9f20aac 100644
--- a/pyanaconda/anaconda_log.py
+++ b/pyanaconda/anaconda_log.py
@@ -191,7 +191,7 @@ class AnacondaLog:
         syslogHandler.setLevel(logging.DEBUG)
         logr.addHandler(syslogHandler)
 
-    # pylint: disable=W0622
+    # pylint: disable=redefined-builtin
     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/anaconda_optparse.py b/pyanaconda/anaconda_optparse.py
index 7a2f646..627178f 100644
--- a/pyanaconda/anaconda_optparse.py
+++ b/pyanaconda/anaconda_optparse.py
@@ -122,7 +122,7 @@ class AnacondaOptionParser(OptionParser):
             option.process(arg, val, values, self)
         return values
 
-    # pylint: disable=W0221
+    # pylint: disable=arguments-differ
     def parse_args(self, args=None, values=None, cmdline=None):
         """
         Like OptionParser.parse_args(), but also parses the boot cmdline.
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index f930752..2883829 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1780,7 +1780,7 @@ class MacEFIGRUB(EFIGRUB):
 
 
 # Inherit abstract methods from BootLoader
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 class YabootBase(BootLoader):
     def write_config_password(self, config):
         if self.password:
diff --git a/pyanaconda/constants.py b/pyanaconda/constants.py
index b6889d7..667a403 100644
--- a/pyanaconda/constants.py
+++ b/pyanaconda/constants.py
@@ -31,7 +31,7 @@ SELINUX_DEFAULT = -1
 ADDON_PATHS = ["/usr/share/anaconda/addons"]
 
 # pull in kickstart constants as well
-# pylint: disable=W0401
+# pylint: disable=wildcard-import
 from pykickstart.constants import *
 
 # common string needs to be easy to change
diff --git a/pyanaconda/constants_text.py b/pyanaconda/constants_text.py
index 36770f7..750a984 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=W0401
+# pylint: disable=wildcard-import
 from pyanaconda.constants import *
 from pyanaconda.i18n import _, N_
 
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index cefbddc..8cd3f07 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -174,7 +174,7 @@ class AnacondaExceptionHandler(ExceptionHandler):
         # run kickstart traceback scripts (if necessary)
         try:
             kickstart.runTracebackScripts(anaconda.ksdata.scripts)
-        # pylint: disable=W0702
+        # pylint: disable=bare-except
         except:
             pass
 
diff --git a/pyanaconda/flags.py b/pyanaconda/flags.py
index e6d6e4a..8d380ab 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=E1101
+        # pylint: disable=no-member
         if attr not in self.__dict__ and not self._in_init:
             raise AttributeError(attr)
         else:
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 4366aef..0355f22 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -695,7 +695,7 @@ def ifcfg_to_ksdata(ifcfg, devname):
         kwargs["device"] = ifcfg.get("PHYSDEV")
         kwargs["vlanid"] = ifcfg.get("VLAN_ID")
 
-    # pylint: disable=E1101
+    # pylint: disable=no-member
     nd = handler.NetworkData(**kwargs)
 
     # teaming
@@ -713,7 +713,7 @@ def ifcfg_to_ksdata(ifcfg, devname):
 def hostname_ksdata(hostname):
     from pyanaconda.kickstart import AnacondaKSHandler
     handler = AnacondaKSHandler()
-    # pylint: disable=E1101
+    # pylint: disable=no-member
     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 a6262d0..54b0688 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -651,7 +651,7 @@ class Payload(object):
         self._copyDriverDiskFiles()
 
 # Inherit abstract methods from Payload
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 class ImagePayload(Payload):
     """ An ImagePayload installs an OS image to the target system. """
 
@@ -662,7 +662,7 @@ class ImagePayload(Payload):
         Payload.__init__(self, data)
 
 # Inherit abstract methods from ImagePayload
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 class ArchivePayload(ImagePayload):
     """ An ArchivePayload unpacks source archives onto the target system. """
 
diff --git a/pyanaconda/packaging/tarpayload.py b/pyanaconda/packaging/tarpayload.py
index b3dd2ed..1a5f2e7 100644
--- a/pyanaconda/packaging/tarpayload.py
+++ b/pyanaconda/packaging/tarpayload.py
@@ -40,7 +40,7 @@ from pyanaconda.constants import ROOT_PATH
 from pyanaconda.packaging import ArchivePayload, PayloadError
 
 # TarPayload is not yet fully implemented
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 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 7fa2950..4f2796a 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -1499,7 +1499,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=W9910
+        # pylint: disable=bad-preconf-access
         yb.preconf.fn = ROOT_PATH + yum_conf_path
         yb.conf.multilib_policy = "all"
 
diff --git a/pyanaconda/sitecustomize.py b/pyanaconda/sitecustomize.py
index c88ef6a..a5e1a29 100644
--- a/pyanaconda/sitecustomize.py
+++ b/pyanaconda/sitecustomize.py
@@ -19,5 +19,5 @@
 #
 
 import sys
-# pylint: disable=E1101
+# pylint: disable=no-member
 sys.setdefaultencoding('utf-8')
diff --git a/pyanaconda/threads.py b/pyanaconda/threads.py
index ef7f140..eea1da6 100644
--- a/pyanaconda/threads.py
+++ b/pyanaconda/threads.py
@@ -225,7 +225,7 @@ class AnacondaThread(threading.Thread):
         log.info("Running Thread: %s (%s)", self.name, self.ident)
         try:
             threading.Thread.run(self, *args, **kwargs)
-        # pylint: disable=W0702
+        # pylint: disable=bare-except
         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 ddd5016..9e2782d 100644
--- a/pyanaconda/ui/common.py
+++ b/pyanaconda/ui/common.py
@@ -351,7 +351,7 @@ class Spoke(UIObject):
         log.debug("Left spoke: %s", self.__class__.__name__)
 
 # Inherit abstract methods from Spoke
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 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
@@ -402,7 +402,7 @@ class NormalSpoke(Spoke):
         return True
 
 # Inherit abstract methods from NormalSpoke
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 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.
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 9912ccd..a90ce90 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -227,7 +227,7 @@ class ErrorDialog(GUIObject):
     mainWidgetName = "errorDialog"
     uiFile = "main.glade"
 
-    # pylint: disable=W0221
+    # pylint: disable=arguments-differ
     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 f3fc74f..ac25b6f 100644
--- a/pyanaconda/ui/gui/spokes/__init__.py
+++ b/pyanaconda/ui/gui/spokes/__init__.py
@@ -62,7 +62,7 @@ class Spoke(GUIObject):
         pass
 
 # Inherit abstract methods from Spoke and common.StandaloneSpoke
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 class StandaloneSpoke(Spoke, common.StandaloneSpoke):
     def __init__(self, data, storage, payload, instclass):
         Spoke.__init__(self, data)
@@ -79,7 +79,7 @@ class StandaloneSpoke(Spoke, common.StandaloneSpoke):
             self.window.connect("quit-clicked", lambda *args: cb())
 
 # Inherit abstract methods from common.NormalSpoke
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 class NormalSpoke(Spoke, common.NormalSpoke):
     def __init__(self, data, storage, payload, instclass):
         if self.__class__ is NormalSpoke:
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 5f0d922..49c4f3c 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1959,7 +1959,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
         freeSpace = getattr(c, "freeSpace", None)
 
         # else branch of for loop above ensures idx is defined
-        # pylint: disable=W0631
+        # pylint: disable=undefined-loop-variable
         self._containerStore.insert(idx, self._container_store_row(self._device_container_name, freeSpace))
         self._containerCombo.set_active(idx)
         self._modifyContainerButton.set_sensitive(not container_exists)
diff --git a/pyanaconda/ui/gui/spokes/lib/accordion.py b/pyanaconda/ui/gui/spokes/lib/accordion.py
index 4b346b8..6a9f8a8 100644
--- a/pyanaconda/ui/gui/spokes/lib/accordion.py
+++ b/pyanaconda/ui/gui/spokes/lib/accordion.py
@@ -185,7 +185,7 @@ class Page(Gtk.Box):
         selector.set_margin_bottom(6)
         self.members.append(selector)
 
-        # pylint: disable=E1101
+        # pylint: disable=no-member
         if self._mountpointType(selector.props.mountpoint) == DATA_DEVICE:
             self._dataBox.add(selector)
         else:
@@ -239,7 +239,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=W0231,W0233
+        # pylint: disable=super-init-not-called,non-parent-init-called
         Gtk.Box.__init__(self, orientation=Gtk.Orientation.VERTICAL, spacing=6)
         self.members = []
         self.pageTitle = title
@@ -264,7 +264,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=W0231,W0233
+        # pylint: disable=super-init-not-called,non-parent-init-called
         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 0cc7652..2cff0aa 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=W0221
+    # pylint: disable=arguments-differ
     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=W0221
+    # pylint: disable=arguments-differ
     def refresh(self, disks, free, showRemove=True, setBoot=True):
         super(SelectedDisksDialog, self).refresh()
 
@@ -130,7 +130,7 @@ class SelectedDisksDialog(GUIObject):
         size = str(Size(bytes=long(size))).upper()
         free = str(Size(bytes=long(free))).upper()
 
-        # pylint: disable=W9922
+        # pylint: disable=unescaped-markup
         text = P_("<b>%(count)d disk; %(size)s capacity; %(free)s free space</b> "
                    "(unpartitioned and in filesystems)",
                   "<b>%(count)d disks; %(size)s capacity; %(free)s free space</b> "
diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
index 892f357..10aca19 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
@@ -219,7 +219,7 @@ class ConfirmDeleteDialog(GUIObject):
     def on_delete_confirm_clicked(self, button, *args):
         self.window.destroy()
 
-    # pylint: disable=W0221
+    # pylint: disable=arguments-differ
     def refresh(self, mountpoint, device, rootName, subvols=False):
         GUIObject.refresh(self)
         label = self.builder.get_object("confirmLabel")
diff --git a/pyanaconda/ui/gui/spokes/lib/detailederror.py b/pyanaconda/ui/gui/spokes/lib/detailederror.py
index 8912227..f8082f4 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=W0221
+    # pylint: disable=arguments-differ
     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 d612ef8..327c194 100644
--- a/pyanaconda/ui/gui/spokes/lib/resize.py
+++ b/pyanaconda/ui/gui/spokes/lib/resize.py
@@ -312,7 +312,7 @@ class ResizeDialog(GUIObject):
     def _update_reclaim_button(self, got):
         self._resizeButton.set_sensitive(got+self._initialFreeSpace >= self.payload.spaceRequired)
 
-    # pylint: disable=W0221
+    # pylint: disable=arguments-differ
     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 33cb85f..f98db86 100644
--- a/pyanaconda/ui/gui/spokes/lib/summary.py
+++ b/pyanaconda/ui/gui/spokes/lib/summary.py
@@ -35,7 +35,7 @@ class ActionSummaryDialog(GUIObject):
         GUIObject.__init__(self, data)
         self._store = self.builder.get_object("actionStore")
 
-    # pylint: disable=W0221
+    # pylint: disable=arguments-differ
     def initialize(self, actions):
         for (i, action) in enumerate(actions, start=1):
             mountpoint = ""
@@ -55,7 +55,7 @@ class ActionSummaryDialog(GUIObject):
                                 action.device.name,
                                 mountpoint])
 
-    # pylint: disable=W0221
+    # pylint: disable=arguments-differ
     def refresh(self, actions):
         GUIObject.refresh(self)
 
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 4a65670..3bb0d88 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -694,7 +694,7 @@ class NetworkControlBox(GObject.GObject):
                 and not dev_cfg.device.get_carrier()):
                 # TRANSLATORS: ethernet cable is unplugged
                 unplugged = ', <i>%s</i>' % escape_markup(_("unplugged"))
-        # pylint: disable=W9922
+        # pylint: disable=unescaped-markup
         title = '<span size="large">%s (%s%s)</span>' % \
                  (escape_markup(_(self.device_type_name.get(dev_cfg.device_type, ""))),
                   escape_markup(dev_cfg.get_iface()),
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 322f8ca..727f9ea 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -220,9 +220,9 @@ class SoftwareSelectionSpoke(NormalSpoke):
             # involves side effects like network access.  We need to reference
             # them here, outside of the main thread, to not block the UI.
             try:
-                # pylint: disable=W0104
+                # pylint: disable=pointless-statement
                 self.payload.environments
-                # pylint: disable=W0104
+                # pylint: disable=pointless-statement
                 self.payload.groups
 
                 # Parse the environments and groups into the form we want
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index a38bf9c..8d17e81 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -299,7 +299,7 @@ class IsoChooser(GUIObject):
         GUIObject.__init__(self, data)
         self._chooser = self.builder.get_object("isoChooserDialog")
 
-    # pylint: disable=W0221
+    # pylint: disable=arguments-differ
     def refresh(self, currentFile=""):
         GUIObject.refresh(self)
         self._chooser.connect("current-folder-changed", self.on_folder_changed)
@@ -534,9 +534,9 @@ class SourceSpoke(NormalSpoke, GUISpokeInputCheckHandler):
                     # involves side effects like network access) so go ahead and grab
                     # them now. These are properties with side-effects, just accessing
                     # them will trigger yum.
-                    # pylint: disable=W0104
+                    # pylint: disable=pointless-statement
                     self.payload.environments
-                    # pylint: disable=W0104
+                    # pylint: disable=pointless-statement
                     self.payload.groups
                 except MetadataError:
                     hubQ.send_message("SoftwareSelectionSpoke",
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 828817c..8a8a4c6 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -158,7 +158,7 @@ class NeedSpaceDialog(InstallOptionsDialogBase):
         self.disk_free_label.set_text(str(disk_free))
         self.fs_free_label.set_text(str(fs_free))
 
-    # pylint: disable=W0221
+    # pylint: disable=arguments-differ
     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 "
@@ -191,7 +191,7 @@ class NoSpaceDialog(InstallOptionsDialogBase):
         self.disk_free_label.set_text(str(disk_free))
         self.fs_free_label.set_text(str(fs_free))
 
-    # pylint: disable=W0221
+    # pylint: disable=arguments-differ
     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/helpers.py b/pyanaconda/ui/helpers.py
index fda3e8b..e3dd253 100644
--- a/pyanaconda/ui/helpers.py
+++ b/pyanaconda/ui/helpers.py
@@ -386,7 +386,7 @@ class InputCheckHandler(object):
         return self._check_list.__iter__()
 
 # Inherit abstract methods from InputCheckHandler
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 class GUIInputCheckHandler(InputCheckHandler):
     """Provide InputCheckHandler functionality for Gtk input screens.
 
diff --git a/pyanaconda/ui/tui/simpleline/__init__.py b/pyanaconda/ui/tui/simpleline/__init__.py
index 50ae474..652069b 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 at redhat.com>
 #
 
-# pylint: disable=W0401
+# pylint: disable=wildcard-import
 from pyanaconda.ui.tui.simpleline.base import *
-# pylint: disable=W0401
+# pylint: disable=wildcard-import
 from pyanaconda.ui.tui.simpleline.widgets import *
diff --git a/pyanaconda/ui/tui/spokes/__init__.py b/pyanaconda/ui/tui/spokes/__init__.py
index 57984ba..41c3180 100644
--- a/pyanaconda/ui/tui/spokes/__init__.py
+++ b/pyanaconda/ui/tui/spokes/__init__.py
@@ -33,7 +33,7 @@ __all__ = ["TUISpoke", "EditTUISpoke", "EditTUIDialog", "EditTUISpokeEntry",
            "collect_categories"]
 
 # Inherit abstract methods from Spoke
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 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
@@ -95,7 +95,7 @@ class NormalTUISpoke(TUISpoke, NormalSpoke):
 EditTUISpokeEntry = namedtuple("EditTUISpokeEntry", ["title", "attribute", "aux", "visible"])
 
 # Inherit abstract methods from NormalTUISpoke
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 class EditTUIDialog(NormalTUISpoke):
     """Spoke/dialog used to read new value of textual or password data"""
 
@@ -179,7 +179,7 @@ class OneShotEditTUIDialog(EditTUIDialog):
         return ret
 
 # Inherit abstract methods from NormalTUISpoke
-# pylint: disable=W0223
+# pylint: disable=abstract-method
 class EditTUISpoke(NormalTUISpoke):
     """Spoke with declarative semantics, it contains
        a list of titles, attribute names and regexps
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index 45381df..643a9e1 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -226,9 +226,9 @@ class SourceSpoke(EditTUISpoke, SourceSwitchHandler):
                 self.errors.append(_("Error downloading package metadata"))
             else:
                 try:
-                    # pylint: disable=W0104
+                    # pylint: disable=pointless-statement
                     self.payload.environments
-                    # pylint: disable=W0104
+                    # pylint: disable=pointless-statement
                     self.payload.groups
                 except MetadataError:
                     self.errors.append(_("No installation source available"))
diff --git a/scripts/anaconda-yum b/scripts/anaconda-yum
index f9df3ef..e041b90 100755
--- a/scripts/anaconda-yum
+++ b/scripts/anaconda-yum
@@ -1,5 +1,5 @@
 #!/usr/bin/python
-# pylint: disable=W9910
+# pylint: disable=bad-preconf-access
 #
 # Copyright (C) 2013  Red Hat, Inc.
 #
@@ -409,6 +409,6 @@ if __name__ == "__main__":
 
         run_yum_transaction(args.release, args.arch, args.config, args.installroot,
                             args.tsfile, args.rpmlog, args.test, args.debug, args.macro)
-    # pylint: disable=W0703
+        # pylint: disable=broad-except
     except Exception as e:
         print("ERROR: unexpected error: %s" % e)
diff --git a/tests/glade/markup/check_markup.py b/tests/glade/markup/check_markup.py
index c90d08d..f90e15e 100755
--- a/tests/glade/markup/check_markup.py
+++ b/tests/glade/markup/check_markup.py
@@ -83,7 +83,7 @@ def check_glade_file(glade_file_path, po_map=None):
             # Wrap the label text in <markup> tags and parse the tree
             for label_text in label_texts:
                 try:
-                    # pylint: disable=W9922
+                    # pylint: disable=unescaped-markup
                     pango_tree = etree.fromstring("<markup>%s</markup>" % label_text)
                     _validate_pango_markup(pango_tree)
 
diff --git a/tests/gui/outside/__init__.py b/tests/gui/outside/__init__.py
index 244d748..918a23b 100644
--- a/tests/gui/outside/__init__.py
+++ b/tests/gui/outside/__init__.py
@@ -132,7 +132,7 @@ class Creator(object):
         # First, create a disk image and put a filesystem on it.
         b = blivet.Blivet()
 
-        # pylint: disable=E0602
+        # pylint: disable=undefined-variable
         disk1_path = create_sparse_file(b, "suite", blivet.size.Size(spec="11 MB"))
         b.config.diskImages["suite"] = disk1_path
 
@@ -169,7 +169,7 @@ class Creator(object):
                                          "addtests": "\n".join(addtests),
                                          "anacondaArgs": config.get("anacondaArgs", "")})
         finally:
-            # pylint: disable=E0602
+            # pylint: disable=undefined-variable
             tear_down_disk_images(b)
             shutil.rmtree(self.mountpoint)
 
@@ -199,7 +199,7 @@ class Creator(object):
             raise
         finally:
             part.format.unmount()
-            # pylint: disable=E0602
+            # pylint: disable=undefined-variable
             tear_down_disk_images(b)
 
     def run(self):
@@ -271,7 +271,7 @@ class OutsideMixin(object):
                              msg="automated UI test %s failed" % self.creator.name)
 
     def setUp(self):
-        # pylint: disable=E1102
+        # pylint: disable=not-callable
         self.creator = self.creatorClass()
         self.creator.makeDrives()
         self.creator.makeSuite()
diff --git a/tests/pyanaconda_tests/iutil_test.py b/tests/pyanaconda_tests/iutil_test.py
index c4e930a..ac4fb76 100644
--- a/tests/pyanaconda_tests/iutil_test.py
+++ b/tests/pyanaconda_tests/iutil_test.py
@@ -214,7 +214,7 @@ class RunProgramTests(unittest.TestCase):
     def vt_activate_test(self):
         """Test vtActivate."""
 
-        # pylint: disable=E1101
+        # pylint: disable=no-member
 
         def raise_os_error(*args, **kwargs):
             raise OSError
@@ -228,7 +228,7 @@ class RunProgramTests(unittest.TestCase):
     def get_deep_attr_test(self):
         """Test getdeepattr."""
 
-        # pylint: disable=W0201
+        # pylint: disable=attribute-defined-outside-init
 
         class O(object):
             pass
@@ -253,8 +253,8 @@ class RunProgramTests(unittest.TestCase):
     def set_deep_attr_test(self):
         """Test setdeepattr."""
 
-        # pylint: disable=W0201
-        # pylint: disable=E1101
+        # pylint: disable=attribute-defined-outside-init
+        # pylint: disable=no-member
 
         class O(object):
             pass
@@ -326,7 +326,7 @@ class RunProgramTests(unittest.TestCase):
     def cmp_obj_attrs_test(self):
         """Test cmp_obj_attrs."""
 
-        # pylint: disable=W0201
+        # pylint: disable=attribute-defined-outside-init
 
         class O(object):
             pass
diff --git a/tests/pyanaconda_tests/timezone_test.py b/tests/pyanaconda_tests/timezone_test.py
index 25475ba..3d0d819 100644
--- a/tests/pyanaconda_tests/timezone_test.py
+++ b/tests/pyanaconda_tests/timezone_test.py
@@ -56,9 +56,9 @@ class s390HWclock(unittest.TestCase):
         self.arch_mock.isS390.return_value = True
         self.iutil_mock = mock.Mock()
 
-        # pylint: disable=E1101
+        # pylint: disable=no-member
         timezone.save_hw_clock.func_globals["arch"] = self.arch_mock
-        # pylint: disable=E1101
+        # pylint: disable=no-member
         timezone.save_hw_clock.func_globals["iutil"] = self.iutil_mock
 
     def s390_save_hw_clock_test(self):
diff --git a/tests/pylint/intl.py b/tests/pylint/intl.py
index 3052680..c8baaf3 100644
--- a/tests/pylint/intl.py
+++ b/tests/pylint/intl.py
@@ -51,7 +51,7 @@ class IntlChecker(BaseChecker):
 
             curr = curr.parent
 
-    @check_messages("W9902")
+    @check_messages("found-_-in-module-class")
     def visit_callfunc(self, node):
         # The first test skips internal functions like getattr.
         if isinstance(node.func, astroid.Name) and node.func.name == "_":
diff --git a/tests/pylint/markup.py b/tests/pylint/markup.py
index 82ed332..690eb13 100644
--- a/tests/pylint/markup.py
+++ b/tests/pylint/markup.py
@@ -90,7 +90,7 @@ class MarkupChecker(BaseChecker):
     def _validate_pango_markup_string(self, node, string, lang=None):
         try:
             # QUIS CUSTODIET IPSOS CUSTODES
-            # pylint: disable=W9922
+            # pylint: disable=unescaped-markup
             tree = ET.fromstring("<markup>%s</markup>" % string)
 
             # Check if the markup is necessary
@@ -110,7 +110,7 @@ class MarkupChecker(BaseChecker):
     def __init__(self, linter=None):
         BaseChecker.__init__(self, linter)
 
-    @check_messages("W9920", "W9921", "W9922", "W9923", "W9924", "W9925", "W9926")
+    @check_messages("invalid-markup", "invalid-markup-element", "unescaped-markup", "invalid-translated-markup", "invalid-translated-markup-element", "invalid-pango-translation", "unnecessary-markup")
     def visit_const(self, node):
         if type(node.value) not in (types.StringType, types.UnicodeType):
             return
diff --git a/tests/pylint/preconf.py b/tests/pylint/preconf.py
index a15413f..809db76 100644
--- a/tests/pylint/preconf.py
+++ b/tests/pylint/preconf.py
@@ -33,7 +33,7 @@ class PreconfChecker(BaseChecker):
                       "Accessing yum.preconf outside of _resetYum will cause tracebacks"),
            }
 
-    @check_messages("W9910")
+    @check_messages("bad-preconf-access")
     def visit_getattr(self, node):
         if node.attrname == "preconf":
             if not isinstance(node.scope(), astroid.Function) or not node.scope().name == "_resetYum":
diff --git a/tests/storage/cases/__init__.py b/tests/storage/cases/__init__.py
index be74078..b1bbe75 100644
--- a/tests/storage/cases/__init__.py
+++ b/tests/storage/cases/__init__.py
@@ -25,7 +25,7 @@ import re
 execfile("/usr/share/doc/python-blivet/examples/common.py")
 
 # Set up logging before blivet or anaconda are imported.
-# pylint: disable=E0602
+# pylint: disable=undefined-variable
 set_up_logging()
 blivet_log = logging.getLogger("blivet")
 blivet_log.info(sys.argv[0])
@@ -163,7 +163,7 @@ class TestCaseComponent(object):
            method, but they should call the base method as well to make sure
            the images get destroyed.
         """
-        # pylint: disable=E0602
+        # pylint: disable=undefined-variable
         tear_down_disk_images(self._blivet)
 
         for d in self._disks.values():
-- 
1.8.3.1



More information about the anaconda-patches mailing list