From c766554eea6aac70ce5e493bf60045714a5a6246 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 1 Nov 2021 16:53:19 -0600 Subject: [PATCH] Bang refactor PEP-8 fix Addresses PEP-8 formatting issue in previous commit --- app/utils/bangs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/utils/bangs.py b/app/utils/bangs.py index 9e7123374a..23b3c04bf8 100644 --- a/app/utils/bangs.py +++ b/app/utils/bangs.py @@ -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 ''