summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pylintrc3
-rw-r--r--coverage/codeunit.py18
2 files changed, 13 insertions, 8 deletions
diff --git a/.pylintrc b/.pylintrc
index 8ab3d902..836136f9 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -66,9 +66,8 @@ disable=
I0011,W0122,W0142,W0232,C0323,C0324,W0603,W0703,
# Messages that may be silly:
# R0201: 42:Tracer.stop: Method could be a function
-# C0321: 80:CodeUnit.__lt__: More than one statement on a single line
# E1103: 26:RunTests.test_run_python_file: Instance of 'file' has no 'getvalue' member (but some types could not be inferred)
- R0201,C0321,E1103,
+ R0201,E1103,
# Messages that are noisy for now, eventually maybe we'll turn them on:
# C0103:256:coverage.morf_filename: Invalid name "f" (should match [a-z_][a-z0-9_]{2,30}$)
# W0212: 86:Reporter.report_files: Access to a protected member _analyze of a client class
diff --git a/coverage/codeunit.py b/coverage/codeunit.py
index 9338b3e0..ca1ae5c5 100644
--- a/coverage/codeunit.py
+++ b/coverage/codeunit.py
@@ -79,12 +79,18 @@ class CodeUnit(object):
# Annoying comparison operators. Py3k wants __lt__ etc, and Py2k needs all
# of them defined.
- def __lt__(self, other): return self.name < other.name
- def __le__(self, other): return self.name <= other.name
- def __eq__(self, other): return self.name == other.name
- def __ne__(self, other): return self.name != other.name
- def __gt__(self, other): return self.name > other.name
- def __ge__(self, other): return self.name >= other.name
+ def __lt__(self, other):
+ return self.name < other.name
+ def __le__(self, other):
+ return self.name <= other.name
+ def __eq__(self, other):
+ return self.name == other.name
+ def __ne__(self, other):
+ return self.name != other.name
+ def __gt__(self, other):
+ return self.name > other.name
+ def __ge__(self, other):
+ return self.name >= other.name
def flat_rootname(self):
"""A base for a flat filename to correspond to this code unit.