[blivet:master 2/2] Restrict scope of pylint pragmas as much as possible
mulhern
amulhern at redhat.com
Mon Apr 21 17:16:38 UTC 2014
Signed-off-by: mulhern <amulhern at redhat.com>
---
scripts/makebumpver | 3 +--
tests/devices_test.py | 6 ++----
tests/tsort_test.py | 3 +--
3 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/scripts/makebumpver b/scripts/makebumpver
index 4b4ed88..69012d3 100755
--- a/scripts/makebumpver
+++ b/scripts/makebumpver
@@ -377,8 +377,7 @@ class MakeBumpVer:
print "!!! Failed to replace '%s' with '%s'" % (search, replace)
sys.exit(1)
- # pylint: disable=undefined-loop-variable
- lines[i] = re.sub(search, replace, lines[i])
+ lines[i] = re.sub(search, replace, lines[i]) # pylint: disable=undefined-loop-variable
def _writeNewSpec(self, newVersion, rpmlog):
f = open(self.spec, 'r')
diff --git a/tests/devices_test.py b/tests/devices_test.py
index 8573f57..7e1a8f3 100644
--- a/tests/devices_test.py
+++ b/tests/devices_test.py
@@ -511,13 +511,11 @@ class BTRFSDeviceTestCase(DeviceStateTestCase):
"""Test for method calls on initialized BTRFS Devices."""
# volumes do not have ancestor volumes
with self.assertRaises(AttributeError):
- # pylint: disable=no-member,pointless-statement
- self.dev1.volume
+ self.dev1.volume # pylint: disable=no-member,pointless-statement
# subvolumes do not have default subvolumes
with self.assertRaises(AttributeError):
- # pylint: disable=no-member,pointless-statement
- self.dev2.defaultSubVolume
+ self.dev2.defaultSubVolume # pylint: disable=no-member,pointless-statement
self.assertIsNotNone(self.dev2.volume)
diff --git a/tests/tsort_test.py b/tests/tsort_test.py
index f385576..7464127 100644
--- a/tests/tsort_test.py
+++ b/tests/tsort_test.py
@@ -41,8 +41,7 @@ class TopologicalSortTestCase(unittest.TestCase):
try:
order = blivet.tsort.tsort(graph)
- # pylint: disable=broad-except
- except Exception as e:
+ except Exception as e: # pylint: disable=broad-except
self.fail(e)
# verify output list is of the correct length
--
1.8.3.1
More information about the anaconda-patches
mailing list