From 7c66441eab3af17539c478a2cb4e19cd93ba0cf4 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 23 Oct 2013 22:35:51 -0400 Subject: enumerate has a start parameter! --HG-- branch : 4.0 --- coverage/html.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'coverage/html.py') diff --git a/coverage/html.py b/coverage/html.py index d8779233..e1966bfb 100644 --- a/coverage/html.py +++ b/coverage/html.py @@ -186,8 +186,7 @@ class HtmlReporter(Reporter): lines = [] - for lineno, line in enumerate(source_token_lines(source)): - lineno += 1 # 1-based line numbers. + for lineno, line in enumerate(source_token_lines(source), start=1): # Figure out how to mark this line. line_class = [] annotate_html = "" -- cgit v1.2.1