diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2013-10-23 22:35:51 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2013-10-23 22:35:51 -0400 |
commit | 1582330616882c0c3024dd2a54b1e6fd390ddffb (patch) | |
tree | 489921e4642df55fbfdf1a4d060bd0e1df078911 /igor.py | |
parent | 36f69d46b4383ae1140c4f1f557fd2bc66ca8e19 (diff) | |
download | python-coveragepy-1582330616882c0c3024dd2a54b1e6fd390ddffb.tar.gz |
enumerate has a start parameter!
Diffstat (limited to 'igor.py')
-rw-r--r-- | igor.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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(): |