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
commit1582330616882c0c3024dd2a54b1e6fd390ddffb (patch)
tree489921e4642df55fbfdf1a4d060bd0e1df078911 /igor.py
parent36f69d46b4383ae1140c4f1f557fd2bc66ca8e19 (diff)
downloadpython-coveragepy-1582330616882c0c3024dd2a54b1e6fd390ddffb.tar.gz
enumerate has a start parameter!
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 6c5d56b..f7879d7 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():