summaryrefslogtreecommitdiff
path: root/coverage/misc.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-12-02 07:27:14 -0500
committerNed Batchelder <ned@nedbatchelder.com>2009-12-02 07:27:14 -0500
commite2c55d3f8436cc91290897f9ef9d1a478b9d218d (patch)
treeaafeffb08566ad99b2ce16cf92fc5d5adabcaeba /coverage/misc.py
parente657eb27575a5932d1bb5f488fe0643137943a6a (diff)
downloadpython-coveragepy-e2c55d3f8436cc91290897f9ef9d1a478b9d218d.tar.gz
Massive eol whitespace clean-up.
Diffstat (limited to 'coverage/misc.py')
-rw-r--r--coverage/misc.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/coverage/misc.py b/coverage/misc.py
index aa61fc9..0e6bcf9 100644
--- a/coverage/misc.py
+++ b/coverage/misc.py
@@ -2,10 +2,10 @@
def nice_pair(pair):
"""Make a nice string representation of a pair of numbers.
-
+
If the numbers are equal, just return the number, otherwise return the pair
with a dash between them, indicating the range.
-
+
"""
start, end = pair
if start == end:
@@ -20,10 +20,10 @@ def format_lines(statements, lines):
Format a list of line numbers for printing by coalescing groups of lines as
long as the lines represent consecutive statements. This will coalesce
even if there are gaps between statements.
-
+
For example, if `statements` is [1,2,3,4,5,10,11,12,13,14] and
`lines` is [1,2,5,10,11,13,14] then the result will be "1-2, 5-11, 13-14".
-
+
"""
pairs = []
i = 0
@@ -47,9 +47,9 @@ def format_lines(statements, lines):
def expensive(fn):
"""A decorator to cache the result of an expensive operation.
-
+
Only applies to methods with no arguments.
-
+
"""
attr = "_cache_" + fn.__name__
def _wrapped(self):