diff --git a/manage b/manage index 8b1975bde..bd89e7f2b 100755 --- a/manage +++ b/manage @@ -37,7 +37,7 @@ PYLINT_SEARX_DISABLE_OPTION="\ I,C,R,\ W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\ E1136" -PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES="supported_languages,language_aliases,logger" +PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES="supported_languages,language_aliases,logger,categories" PYLINT_OPTIONS="-m pylint -j 0 --rcfile .pylintrc" help() { diff --git a/searx/engines/duckduckgo_definitions.py b/searx/engines/duckduckgo_definitions.py index e35b55f74..b9436f67f 100644 --- a/searx/engines/duckduckgo_definitions.py +++ b/searx/engines/duckduckgo_definitions.py @@ -64,7 +64,7 @@ def request(query, params): params['url'] = URL.format(query=urlencode({'q': query})) language = match_language( params['language'], - supported_languages, # pylint: disable=undefined-variable + supported_languages, language_aliases ) language = language.split('-')[0] diff --git a/searx/engines/google.py b/searx/engines/google.py index d1f564d99..0f79b70db 100644 --- a/searx/engines/google.py +++ b/searx/engines/google.py @@ -277,7 +277,6 @@ def request(query, params): offset = (params['pageno'] - 1) * 10 lang_info = get_lang_info( - # pylint: disable=undefined-variable params, supported_languages, language_aliases, True ) diff --git a/searx/engines/google_images.py b/searx/engines/google_images.py index bd13144b2..ffdd6675e 100644 --- a/searx/engines/google_images.py +++ b/searx/engines/google_images.py @@ -92,7 +92,6 @@ def request(query, params): """Google-Video search request""" lang_info = get_lang_info( - # pylint: disable=undefined-variable params, supported_languages, language_aliases, False ) logger.debug( diff --git a/searx/engines/google_news.py b/searx/engines/google_news.py index 0dd0c7b94..bab8bc86a 100644 --- a/searx/engines/google_news.py +++ b/searx/engines/google_news.py @@ -75,7 +75,6 @@ def request(query, params): """Google-News search request""" lang_info = get_lang_info( - # pylint: disable=undefined-variable params, supported_languages, language_aliases, False ) logger.debug( diff --git a/searx/engines/google_scholar.py b/searx/engines/google_scholar.py index 5c7a0d9e9..95b7d7a03 100644 --- a/searx/engines/google_scholar.py +++ b/searx/engines/google_scholar.py @@ -73,7 +73,6 @@ def request(query, params): offset = (params['pageno'] - 1) * 10 lang_info = get_lang_info( - # pylint: disable=undefined-variable params, supported_languages, language_aliases, False ) logger.debug( diff --git a/searx/engines/google_videos.py b/searx/engines/google_videos.py index f75b9f5d5..b04ab5899 100644 --- a/searx/engines/google_videos.py +++ b/searx/engines/google_videos.py @@ -110,7 +110,6 @@ def request(query, params): """Google-Video search request""" lang_info = get_lang_info( - # pylint: disable=undefined-variable params, supported_languages, language_aliases, False ) logger.debug( diff --git a/searx/engines/peertube.py b/searx/engines/peertube.py index 058065c03..f9cd50be1 100644 --- a/searx/engines/peertube.py +++ b/searx/engines/peertube.py @@ -34,7 +34,6 @@ def request(query, params): search_url = sanitized_url + "/api/v1/search/videos/?pageno={pageno}&{query}" query_dict = {"search": query} language = params["language"].split("-")[0] - # pylint: disable=undefined-variable if "all" != language and language in supported_languages: query_dict["languageOneOf"] = language params["url"] = search_url.format( diff --git a/searx/engines/qwant.py b/searx/engines/qwant.py index 8d03d8324..18e6a65d8 100644 --- a/searx/engines/qwant.py +++ b/searx/engines/qwant.py @@ -89,7 +89,6 @@ def request(query, params): else: language = match_language( params['language'], - # pylint: disable=undefined-variable supported_languages, language_aliases, ) diff --git a/searx/engines/xpath.py b/searx/engines/xpath.py index 3a8d32a6a..a7a5e57ab 100644 --- a/searx/engines/xpath.py +++ b/searx/engines/xpath.py @@ -184,7 +184,7 @@ def response(resp): ''' results = [] dom = html.fromstring(resp.text) - is_onion = 'onions' in categories # pylint: disable=undefined-variable + is_onion = 'onions' in categories if results_xpath: for result in eval_xpath_list(dom, results_xpath):