Browse Source

[fix] add 'categories' to PYLINT_ADDITIONAL_BUILTINS_FOR_ENGINES

androp no longer needed (see line 591 in 7b235a1)::

    # pylint: disable=undefined-variable

Suggested-by: @dalf https://github.com/searxng/searxng/issues/102#issuecomment-914068609
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Markus Heiser 3 years ago
parent
commit
82847df300
2 changed files with 2 additions and 2 deletions
  1. 1 1
      manage
  2. 1 1
      searx/engines/xpath.py

+ 1 - 1
manage

@@ -37,7 +37,7 @@ PYLINT_SEARX_DISABLE_OPTION="\
 I,C,R,\
 I,C,R,\
 W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
 W0105,W0212,W0511,W0603,W0613,W0621,W0702,W0703,W1401,\
 E1136"
 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"
 PYLINT_OPTIONS="-m pylint -j 0 --rcfile .pylintrc"
 
 
 help() {
 help() {

+ 1 - 1
searx/engines/xpath.py

@@ -184,7 +184,7 @@ def response(resp):
     '''
     '''
     results = []
     results = []
     dom = html.fromstring(resp.text)
     dom = html.fromstring(resp.text)
-    is_onion = 'onions' in categories  # pylint: disable=undefined-variable
+    is_onion = 'onions' in categories
 
 
     if results_xpath:
     if results_xpath:
         for result in eval_xpath_list(dom, results_xpath):
         for result in eval_xpath_list(dom, results_xpath):