Skip to content

Commit

Permalink
Clean up redundant backslash flagged by codefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rlskoeser committed Apr 24, 2024
1 parent 785d4b3 commit 1d6be50
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions viapy/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@


class ViafWidget(autocomplete.Select2):
'''Custom autocomplete select widget that displays VIAF id as a link.
Extends :class:`dal.autocomplete.Select2`.'''
"""Custom autocomplete select widget that displays VIAF id as a link.
Extends :class:`dal.autocomplete.Select2`."""

def render(self, name, value, renderer=None, attrs=None):
# select2 filters based on existing choices (non-existent here),
Expand All @@ -13,7 +13,6 @@ def render(self, name, value, renderer=None, attrs=None):
self.choices = [(value, value)]
widget = super(ViafWidget, self).render(name, value, attrs)
return mark_safe(
'%s<p><br /><a id="viaf_uri" target="_blank" href="%s">%s</a></p>' % \
(widget, value or '', value or ''))


'%s<p><br /><a id="viaf_uri" target="_blank" href="%s">%s</a></p>'
% (widget, value or "", value or "")
)

0 comments on commit 1d6be50

Please sign in to comment.