From cd033b5416a86a89920f1240595b7a2e7a9a35a0 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 7 Sep 2021 10:26:15 +0200 Subject: [PATCH] [fix] drop useless pylint: disable=undefined-variable Since 7b235a1 (see line 591) it is no longer needed to disable 'undefined-variable' for names defined in:: PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES Suggested-by: @dalf https://github.com/searxng/searxng/issues/102#issuecomment-914068609 Signed-off-by: Markus Heiser --- searx/engines/duckduckgo_definitions.py | 2 +- searx/engines/google.py | 1 - searx/engines/google_images.py | 1 - searx/engines/google_news.py | 1 - searx/engines/google_scholar.py | 1 - searx/engines/google_videos.py | 1 - searx/engines/peertube.py | 1 - searx/engines/qwant.py | 1 - 8 files changed, 1 insertion(+), 8 deletions(-) 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, )