mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-30 22:19:57 +02:00
⬆ Use f-strings
This commit is contained in:
parent
bea56117ae
commit
704e7cca1c
1 changed files with 3 additions and 7 deletions
|
@ -32,16 +32,12 @@ def gen_diff_report(gt_in, ocr_in, css_prefix, joiner, none, differences=False):
|
|||
|
||||
# Set Bootstrap tooltip to the segment id
|
||||
if id_:
|
||||
html_custom_attrs += 'data-toggle="tooltip" title="{}"'.format(id_)
|
||||
html_custom_attrs += f'data-toggle="tooltip" title="{id_}"'
|
||||
|
||||
if css_classes:
|
||||
return '<span class="{css_classes}" {html_custom_attrs}>{html_t}</span>'.format(
|
||||
css_classes=css_classes,
|
||||
html_t=html_t,
|
||||
html_custom_attrs=html_custom_attrs,
|
||||
)
|
||||
return f'<span class="{css_classes}" {html_custom_attrs}>{html_t}</span>'
|
||||
else:
|
||||
return "{html_t}".format(html_t=html_t)
|
||||
return f"{html_t}"
|
||||
|
||||
if isinstance(gt_in, ExtractedText):
|
||||
if not isinstance(ocr_in, ExtractedText):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue