Commit c4c80d98 authored by Stefan Behnel's avatar Stefan Behnel

improve variable name

parent a361652c
...@@ -169,7 +169,7 @@ class AnnotationCCodeWriter(CCodeWriter): ...@@ -169,7 +169,7 @@ class AnnotationCCodeWriter(CCodeWriter):
group_name, match.group(group_name)) group_name, match.group(group_name))
lines = self._htmlify_code(cython_code).splitlines() lines = self._htmlify_code(cython_code).splitlines()
line_width = len(str(len(lines))) lineno_width = len(str(len(lines)))
for k, line in enumerate(lines, 1): for k, line in enumerate(lines, 1):
try: try:
...@@ -198,10 +198,10 @@ class AnnotationCCodeWriter(CCodeWriter): ...@@ -198,10 +198,10 @@ class AnnotationCCodeWriter(CCodeWriter):
u"<pre class='cython line score-{score}'{onclick}>" u"<pre class='cython line score-{score}'{onclick}>"
# generate line number with expand symbol in front, # generate line number with expand symbol in front,
# and the right number of digit # and the right number of digit
u"{expandsymbol}{line:0{line_width}d}: {code}</pre>\n".format( u"{expandsymbol}{line:0{lineno_width}d}: {code}</pre>\n".format(
score=score, score=score,
expandsymbol=expandsymbol, expandsymbol=expandsymbol,
line_width=line_width, lineno_width=lineno_width,
line=k, line=k,
code=line.rstrip(), code=line.rstrip(),
onclick=onclick, onclick=onclick,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment