Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<pre>${lineno}</pre>
<pre>${linecount}</pre>
<pre>${source}</pre>
''')
kwargs = {}
kwargs['lineno'] = str(lineno)
if lineno in cdata.covered:
kwargs['covclass'] = 'coveredLine'
kwargs['linecount'] = str(cdata.covered.get(lineno, 0))
elif lineno in cdata.uncovered:
kwargs['covclass'] = 'uncoveredLine'
kwargs['linecount'] = ''
else:
kwargs['covclass'] = ''
kwargs['linecount'] = ''
kwargs['source'] = html.escape(source)
return rowstr.substitute(**kwargs)