Skip to content

Commit

Permalink
Bang refactor PEP-8 fix
Browse files Browse the repository at this point in the history
Addresses PEP-8 formatting issue in previous commit
  • Loading branch information
benbusby committed Nov 1, 2021
1 parent ddf951d commit c766554
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/utils/bangs.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def resolve_bang(query: str, bangs_dict: dict) -> str:
if operator not in split_query \
and operator[1:] + operator[0] not in split_query:
continue
return bangs_dict[operator]['url'].replace('{}',
return bangs_dict[operator]['url'].replace(
'{}',
query.replace(operator if operator in split_query
else operator[1:] + operator[0], '').strip(), 1)
return ''

0 comments on commit c766554

Please sign in to comment.