[PATCH 6/6] Disable pylint messages too annoying to deal with.
David Shea
dshea at redhat.com
Fri Jan 24 16:45:26 UTC 2014
This covers a couple of wildcard imports and a few spots where a
variable name was used in a global scope and also in a function but
seriously, what else are we going to call a line.
---
dracut/parse-kickstart | 7 +++++++
dracut/python-deps | 2 ++
2 files changed, 9 insertions(+)
diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index e0b1622..4f7edb4 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -19,6 +19,7 @@ import glob
from pykickstart.parser import KickstartParser, preprocessKickstart
from pykickstart.version import returnClassForVersion
from pykickstart.errors import KickstartError
+# pylint: disable-msg=W0401
from pykickstart.constants import *
from pykickstart import commands
from collections import OrderedDict
@@ -43,6 +44,7 @@ def read_cmdline(f):
lines = open(f).readlines()
except IOError:
lines = []
+ # pylint: disable-msg=W0621
for line in lines:
for arg in line.split():
k,v = arg.split("=", 1)
@@ -178,6 +180,9 @@ class DracutHandler(handlerclass):
obj = handlerclass.dispatcher(self, args, lineno)
# and execute any specified dracut_args
cmd = args[0]
+ # the commands member is implemented by the class returned
+ # by returnClassForVersion
+ # pylint: disable-msg=E1101
command = self.commands[cmd]
if hasattr(command, "dracut_args"):
log.debug("kickstart line %u: handling %s", lineno, cmd)
@@ -222,6 +227,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
for line in f:
if cfg['SUBCHANNELS'] in line:
items = line.strip().split(',')
@@ -233,6 +239,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
line = []
ip=""
autoconf=""
diff --git a/dracut/python-deps b/dracut/python-deps
index 71a6880..80d2f5e 100755
--- a/dracut/python-deps
+++ b/dracut/python-deps
@@ -3,6 +3,7 @@
import os, sys
from modulefinder import ModuleFinder
+# pylint: disable-msg=W0401
from distutils.sysconfig import *
sitedir = get_python_lib()
@@ -18,6 +19,7 @@ def moduledir(pyfile):
if modname not in ('..', 'site-packages'):
return os.path.join(topdir, modname)
+# pylint: disable-msg=W0621
def pyfiles(moddir):
'''basically, "find $moddir -type f -name "*.py"'''
for curdir, _dirs, files in os.walk(moddir):
--
1.8.5.3
More information about the anaconda-patches
mailing list