[blivet:master 1/2] Change all pylint numeric codes to mnemonic strings.
mulhern
amulhern at redhat.com
Mon Apr 21 17:16:37 UTC 2014
The mnemonic strings communicate a bit more information to the reader.
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/size.py | 2 +-
scripts/makebumpver | 2 +-
tests/devices_test.py | 4 ++--
tests/tsort_test.py | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/blivet/size.py b/blivet/size.py
index 405a1b9..da76902 100644
--- a/blivet/size.py
+++ b/blivet/size.py
@@ -318,7 +318,7 @@ class Size(Decimal):
# abbr and prefix are unicode objects so that lower/upper work correctly
# Convert them to str before concatenating so that the return type is
# str.
- # pylint: disable=W0631
+ # pylint: disable=undefined-loop-variable
if abbr:
return retval + " " + abbr.encode("utf-8") + _("B")
else:
diff --git a/scripts/makebumpver b/scripts/makebumpver
index d6e302a..4b4ed88 100755
--- a/scripts/makebumpver
+++ b/scripts/makebumpver
@@ -377,7 +377,7 @@ class MakeBumpVer:
print "!!! Failed to replace '%s' with '%s'" % (search, replace)
sys.exit(1)
- # pylint: disable=W0631
+ # pylint: disable=undefined-loop-variable
lines[i] = re.sub(search, replace, lines[i])
def _writeNewSpec(self, newVersion, rpmlog):
diff --git a/tests/devices_test.py b/tests/devices_test.py
index 70723aa..8573f57 100644
--- a/tests/devices_test.py
+++ b/tests/devices_test.py
@@ -511,12 +511,12 @@ class BTRFSDeviceTestCase(DeviceStateTestCase):
"""Test for method calls on initialized BTRFS Devices."""
# volumes do not have ancestor volumes
with self.assertRaises(AttributeError):
- # pylint: disable=E1101,W0104
+ # pylint: disable=no-member,pointless-statement
self.dev1.volume
# subvolumes do not have default subvolumes
with self.assertRaises(AttributeError):
- # pylint: disable=E1101,W0104
+ # pylint: disable=no-member,pointless-statement
self.dev2.defaultSubVolume
self.assertIsNotNone(self.dev2.volume)
diff --git a/tests/tsort_test.py b/tests/tsort_test.py
index 7cf172f..f385576 100644
--- a/tests/tsort_test.py
+++ b/tests/tsort_test.py
@@ -41,7 +41,7 @@ class TopologicalSortTestCase(unittest.TestCase):
try:
order = blivet.tsort.tsort(graph)
- # pylint: disable=W0703
+ # pylint: disable=broad-except
except Exception as e:
self.fail(e)
--
1.8.3.1
More information about the anaconda-patches
mailing list