From f154b5f2e2587792ec46cf5b67f6b74aa6f731d5 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 26 Oct 2021 16:17:38 -0600 Subject: [PATCH] PEP-8 formatting fix --- app/utils/results.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/utils/results.py b/app/utils/results.py index 8f79326..bb17051 100644 --- a/app/utils/results.py +++ b/app/utils/results.py @@ -4,7 +4,6 @@ import urllib.parse as urlparse from urllib.parse import parse_qs import re - SKIP_ARGS = ['ref_src', 'utm'] SKIP_PREFIX = ['//www.', '//mobile.', '//m.'] GOOG_STATIC = 'www.gstatic.com' @@ -14,7 +13,6 @@ BLANK_B64 = ('data:image/png;base64,' 'iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAD0lEQVR42mNkw' 'AIYh7IgAAVVAAuInjI5AAAAAElFTkSuQmCC') - # Ad keywords BLACKLIST = [ 'ad', 'anuncio', 'annuncio', 'annonce', 'Anzeige', '广告', '廣告', 'Reklama', @@ -56,9 +54,9 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup: element.replace_with( re.sub(r'\b((?![{}<>-])' + target_word + r'(?![{}<>-]))\b', - r'\1', - element, - flags=re.I) + r'\1', + element, + flags=re.I) ) # Split all words out of query, grouping the ones wrapped in quotes