diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-12-30 14:25:25 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-12-30 14:25:25 -0500 |
commit | 32b308f6471fbd1167480b3fd01827652d7bd9a2 (patch) | |
tree | def294fe401290db774b5a21489e810c3d177997 | |
parent | 04ef8ebce940e5ab73c770a418ecf9721f4e12f8 (diff) | |
download | python-coveragepy-git-32b308f6471fbd1167480b3fd01827652d7bd9a2.tar.gz |
One more pylint improvement: no more multi-statement lines.
-rw-r--r-- | .pylintrc | 3 | ||||
-rw-r--r-- | coverage/codeunit.py | 18 |
2 files changed, 13 insertions, 8 deletions
@@ -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. |