[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,4 +1,5 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
# pylint: disable=missing-module-docstring, protected-access
from mock import patch
@ -8,7 +9,7 @@ from searx.network.network import Network, NETWORKS, initialize
from tests import SearxTestCase
class TestNetwork(SearxTestCase):
class TestNetwork(SearxTestCase): # pylint: disable=missing-class-docstring
def setUp(self):
initialize()
@ -121,7 +122,7 @@ class TestNetwork(SearxTestCase):
await network.aclose()
class TestNetworkRequestRetries(SearxTestCase):
class TestNetworkRequestRetries(SearxTestCase): # pylint: disable=missing-class-docstring
TEXT = 'Lorem Ipsum'
@ -129,7 +130,7 @@ class TestNetworkRequestRetries(SearxTestCase):
def get_response_404_then_200(cls):
first = True
async def get_response(*args, **kwargs):
async def get_response(*args, **kwargs): # pylint: disable=unused-argument
nonlocal first
if first:
first = False
@ -169,7 +170,7 @@ class TestNetworkRequestRetries(SearxTestCase):
async def test_retries_exception_then_200(self):
request_count = 0
async def get_response(*args, **kwargs):
async def get_response(*args, **kwargs): # pylint: disable=unused-argument
nonlocal request_count
request_count += 1
if request_count < 3:
@ -194,7 +195,7 @@ class TestNetworkRequestRetries(SearxTestCase):
await network.aclose()
class TestNetworkStreamRetries(SearxTestCase):
class TestNetworkStreamRetries(SearxTestCase): # pylint: disable=missing-class-docstring
TEXT = 'Lorem Ipsum'
@ -202,7 +203,7 @@ class TestNetworkStreamRetries(SearxTestCase):
def get_response_exception_then_200(cls):
first = True
def stream(*args, **kwargs):
def stream(*args, **kwargs): # pylint: disable=unused-argument
nonlocal first
if first:
first = False
@ -228,7 +229,7 @@ class TestNetworkStreamRetries(SearxTestCase):
async def test_retries_exception(self):
first = True
def stream(*args, **kwargs):
def stream(*args, **kwargs): # pylint: disable=unused-argument
nonlocal first
if first:
first = False