@@ -151,18 +151,18 @@ def create_item_coverage(doc, report):
151151 doc .add_line (
152152 f'<tr class="coverage-table-{ level .name .replace (" " , "-" ).lower ()} ">'
153153 )
154- doc .add_line ('<td><a href="#sec-%s">%s</a></td>' %
155- (name_hash (level .name ),
156- html .escape (level .name )))
154+ doc .add_line (
155+ f'<td><a href="#sec-{ name_hash (level .name )} ">'
156+ f'{ html .escape (level .name )} </a></td>'
157+ )
157158 doc .add_line (f"<td>{ data .coverage :.1f} %</td>" )
158159 doc .add_line ("<td>" )
159- doc .add_line ('<progress value="%u" max="%u">' %
160- (data .ok , data .items ))
160+ doc .add_line (f'<progress value="{ data .ok } " max="{ data .items } ">' )
161161 doc .add_line (f"{ data .coverage :.2f} %" )
162162 doc .add_line ('</progress>' )
163163 doc .add_line ("</td>" )
164- doc .add_line ('<td align="right">%u </td>' % data . ok )
165- doc .add_line ('<td align="right">%u </td>' % data . items )
164+ doc .add_line (f '<td align="right">{ data . ok } </td>' )
165+ doc .add_line (f '<td align="right">{ data . items } </td>' )
166166 doc .add_line ("</tr>" )
167167 doc .add_line ("</table>" )
168168
@@ -205,12 +205,13 @@ def write_item_box_begin(doc, item, report):
205205 doc .add_line (f'<div class="item-{ html .escape (item .tracing_status .name .lower ())} " '
206206 f'id="item-{ item .tag .hash ()} ">' )
207207
208- doc .add_line ('<div class="item-name">%s %s</div>' %
209- ('<svg class="icon"><use href="#svg-check-square"></use></svg>'
210- if item .tracing_status in (Tracing_Status .OK ,
211- Tracing_Status .JUSTIFIED )
212- else '<svg class="icon"><use href="#svg-alert-triangle"></use></svg>' ,
213- xref_item (item , link = False )))
208+ svg_icon = (
209+ '<svg class="icon"><use href="#svg-check-square"></use></svg>'
210+ if item .tracing_status in (Tracing_Status .OK , Tracing_Status .JUSTIFIED )
211+ else '<svg class="icon"><use href="#svg-alert-triangle"></use></svg>'
212+ )
213+ item_name = f'{ svg_icon } { xref_item (item , link = False )} '
214+ doc .add_line (f'<div class="item-name">{ item_name } </div>' )
214215
215216 doc .add_line ('<div class="attribute">Source: ' )
216217 doc .add_line ('<svg class="icon"><use href="#svg-external-link"></use></svg>' )
@@ -533,9 +534,10 @@ def write_html(report, dot, high_contrast, render_md) -> str:
533534 Github_Reference )):
534535 new_file_heading = item .location .filename
535536 elif isinstance (item .location , Codebeamer_Reference ):
536- new_file_heading = "Codebeamer %s, tracker %u" % \
537- (item .location .cb_root ,
538- item .location .tracker )
537+ new_file_heading = (
538+ f"Codebeamer { item .location .cb_root } ,"
539+ f" tracker { item .location .tracker } "
540+ )
539541 else : # pragma: no cover
540542 assert False
541543 if new_file_heading != file_heading :
0 commit comments