[mod] pylint all files with one profile / drop PYLINT_SEARXNG_DISABLE_OPTION

In the past, some files were tested with the standard profile, others with a
profile in which most of the messages were switched off ... some files were not
checked at all.

- ``PYLINT_SEARXNG_DISABLE_OPTION`` has been abolished
- the distinction ``# lint: pylint`` is no longer necessary
- the pylint tasks have been reduced from three to two

  1. ./searx/engines -> lint engines with additional builtins
  2. ./searx ./searxng_extra ./tests -> lint all other python files

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2024-03-11 14:06:26 +01:00 committed by Markus Heiser
parent 8205f170ff
commit 542f7d0d7b
118 changed files with 261 additions and 369 deletions

View file

@ -1,3 +1,6 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring
from searx import settings
from searx.engines import load_engines
from searx.query import RawTextQuery
@ -16,7 +19,7 @@ TEST_ENGINES = [
]
class TestQuery(SearxTestCase):
class TestQuery(SearxTestCase): # pylint:disable=missing-class-docstring
def test_simple_query(self):
query_text = 'the query'
query = RawTextQuery(query_text, [])
@ -56,7 +59,7 @@ class TestQuery(SearxTestCase):
self.assertEqual(query.getFullQuery(), '<8 another text')
class TestLanguageParser(SearxTestCase):
class TestLanguageParser(SearxTestCase): # pylint:disable=missing-class-docstring
def test_language_code(self):
language = 'es-ES'
query_text = 'the query'
@ -144,7 +147,7 @@ class TestLanguageParser(SearxTestCase):
self.assertEqual(query.autocomplete_list, [':zh-cn', ':zh-hk', ':zh-tw'])
class TestTimeoutParser(SearxTestCase):
class TestTimeoutParser(SearxTestCase): # pylint:disable=missing-class-docstring
def test_timeout_below100(self):
query_text = '<3 the query'
query = RawTextQuery(query_text, [])
@ -196,7 +199,7 @@ class TestTimeoutParser(SearxTestCase):
self.assertEqual(query.autocomplete_list, ['<3', '<850'])
class TestExternalBangParser(SearxTestCase):
class TestExternalBangParser(SearxTestCase): # pylint:disable=missing-class-docstring
def test_external_bang(self):
query_text = '!!ddg the query'
query = RawTextQuery(query_text, [])
@ -226,7 +229,7 @@ class TestExternalBangParser(SearxTestCase):
self.assertEqual(query.get_autocomplete_full_query(a), a + ' the query')
class TestBang(SearxTestCase):
class TestBang(SearxTestCase): # pylint:disable=missing-class-docstring
SPECIFIC_BANGS = ['!dummy_engine', '!du', '!general']
THE_QUERY = 'the query'