summaryrefslogtreecommitdiff
path: root/igor.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2013-10-23 22:35:51 -0400
committerNed Batchelder <ned@nedbatchelder.com>2013-10-23 22:35:51 -0400
commit7c66441eab3af17539c478a2cb4e19cd93ba0cf4 (patch)
tree2e9232396991a428fa3afa308550fd4228f8f34f /igor.py
parentb2d5b1a2e3bfa3b907034cf07ed4a173081ce976 (diff)
downloadpython-coveragepy-git-7c66441eab3af17539c478a2cb4e19cd93ba0cf4.tar.gz
enumerate has a start parameter!
--HG-- branch : 4.0
Diffstat (limited to 'igor.py')
-rw-r--r--igor.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/igor.py b/igor.py
index 6c5d56bf..f7879d7c 100644
--- a/igor.py
+++ b/igor.py
@@ -158,17 +158,17 @@ def do_check_eol():
checked.add(fname)
line = None
- for n, line in enumerate(open(fname, "rb")):
+ for n, line in enumerate(open(fname, "rb"), start=1):
if crlf:
if "\r" in line:
- print("%s@%d: CR found" % (fname, n+1))
+ print("%s@%d: CR found" % (fname, n))
return
if trail_white:
line = line[:-1]
if not crlf:
line = line.rstrip('\r')
if line.rstrip() != line:
- print("%s@%d: trailing whitespace found" % (fname, n+1))
+ print("%s@%d: trailing whitespace found" % (fname, n))
return
if line is not None and not line.strip():