mirror of
https://github.com/ilyakooo0/searx.git
synced 2024-09-11 09:15:54 +03:00
Bump pylint from 2.10.2 to 2.12.2 (#3124)
Bumps [pylint](https://github.com/PyCQA/pylint) from 2.10.2 to 2.12.2. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Changelog](https://github.com/PyCQA/pylint/blob/main/ChangeLog) - [Commits](https://github.com/PyCQA/pylint/compare/v2.10.2...v2.12.2) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
parent
1a18adcc16
commit
179784068f
@ -59,7 +59,7 @@ confidence=
|
|||||||
# --enable=similarities". If you want to run only the classes checker, but have
|
# --enable=similarities". If you want to run only the classes checker, but have
|
||||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||||
# --disable=W"
|
# --disable=W"
|
||||||
disable=bad-whitespace, duplicate-code
|
disable=bad-whitespace, duplicate-code, consider-using-f-string
|
||||||
|
|
||||||
# Enable the message, report, category or checker with the given id(s). You can
|
# Enable the message, report, category or checker with the given id(s). You can
|
||||||
# either give multiple identifier separated by comma (,) or put this option
|
# either give multiple identifier separated by comma (,) or put this option
|
||||||
|
@ -2,7 +2,7 @@ mock==4.0.3
|
|||||||
nose2[coverage_plugin]==0.10.0
|
nose2[coverage_plugin]==0.10.0
|
||||||
cov-core==1.15.0
|
cov-core==1.15.0
|
||||||
pycodestyle==2.7.0
|
pycodestyle==2.7.0
|
||||||
pylint==2.10.2
|
pylint==2.12.2
|
||||||
splinter==0.15.0
|
splinter==0.15.0
|
||||||
transifex-client==0.14.3
|
transifex-client==0.14.3
|
||||||
selenium==3.141.0
|
selenium==3.141.0
|
||||||
|
@ -275,7 +275,7 @@ def get_engines_stats(preferences):
|
|||||||
|
|
||||||
|
|
||||||
def load_engines(engine_list):
|
def load_engines(engine_list):
|
||||||
global engines, engine_shortcuts
|
global engines, engine_shortcuts # pylint: disable=global-variable-not-assigned
|
||||||
engines.clear()
|
engines.clear()
|
||||||
engine_shortcuts.clear()
|
engine_shortcuts.clear()
|
||||||
for engine_data in engine_list:
|
for engine_data in engine_list:
|
||||||
|
@ -35,7 +35,7 @@ def init(engine_settings):
|
|||||||
if 'command' not in engine_settings:
|
if 'command' not in engine_settings:
|
||||||
raise ValueError('engine command : missing configuration key: command')
|
raise ValueError('engine command : missing configuration key: command')
|
||||||
|
|
||||||
global command, working_dir, result_template, delimiter, parse_regex, timeout, environment_variables
|
global command, working_dir, delimiter, parse_regex, environment_variables
|
||||||
|
|
||||||
command = engine_settings['command']
|
command = engine_settings['command']
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ cookies = dict()
|
|||||||
|
|
||||||
|
|
||||||
def init(engine_settings=None):
|
def init(engine_settings=None):
|
||||||
global cookies
|
global cookies # pylint: disable=global-variable-not-assigned
|
||||||
# initial cookies
|
# initial cookies
|
||||||
resp = http_get(url, follow_redirects=False)
|
resp = http_get(url, follow_redirects=False)
|
||||||
if resp.ok:
|
if resp.ok:
|
||||||
|
@ -72,31 +72,26 @@ class TestResolveBangDefinition(SearxTestCase):
|
|||||||
class TestGetBangDefinitionAndAutocomplete(SearxTestCase):
|
class TestGetBangDefinitionAndAutocomplete(SearxTestCase):
|
||||||
|
|
||||||
def test_found(self):
|
def test_found(self):
|
||||||
global TEST_DB
|
|
||||||
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('exam', external_bangs_db=TEST_DB)
|
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('exam', external_bangs_db=TEST_DB)
|
||||||
self.assertEqual(bang_definition, TEST_DB['trie']['exam']['*'])
|
self.assertEqual(bang_definition, TEST_DB['trie']['exam']['*'])
|
||||||
self.assertEqual(new_autocomplete, ['example'])
|
self.assertEqual(new_autocomplete, ['example'])
|
||||||
|
|
||||||
def test_found_optimized(self):
|
def test_found_optimized(self):
|
||||||
global TEST_DB
|
|
||||||
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('example', external_bangs_db=TEST_DB)
|
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('example', external_bangs_db=TEST_DB)
|
||||||
self.assertEqual(bang_definition, TEST_DB['trie']['exam']['ple'])
|
self.assertEqual(bang_definition, TEST_DB['trie']['exam']['ple'])
|
||||||
self.assertEqual(new_autocomplete, [])
|
self.assertEqual(new_autocomplete, [])
|
||||||
|
|
||||||
def test_partial(self):
|
def test_partial(self):
|
||||||
global TEST_DB
|
|
||||||
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('examp', external_bangs_db=TEST_DB)
|
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('examp', external_bangs_db=TEST_DB)
|
||||||
self.assertEqual(bang_definition, None)
|
self.assertEqual(bang_definition, None)
|
||||||
self.assertEqual(new_autocomplete, ['example'])
|
self.assertEqual(new_autocomplete, ['example'])
|
||||||
|
|
||||||
def test_partial2(self):
|
def test_partial2(self):
|
||||||
global TEST_DB
|
|
||||||
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('sea', external_bangs_db=TEST_DB)
|
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('sea', external_bangs_db=TEST_DB)
|
||||||
self.assertEqual(bang_definition, TEST_DB['trie']['sea']['*'])
|
self.assertEqual(bang_definition, TEST_DB['trie']['sea']['*'])
|
||||||
self.assertEqual(new_autocomplete, ['search', 'searching', 'seascapes', 'season'])
|
self.assertEqual(new_autocomplete, ['search', 'searching', 'seascapes', 'season'])
|
||||||
|
|
||||||
def test_error(self):
|
def test_error(self):
|
||||||
global TEST_DB
|
|
||||||
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('error', external_bangs_db=TEST_DB)
|
bang_definition, new_autocomplete = get_bang_definition_and_autocomplete('error', external_bangs_db=TEST_DB)
|
||||||
self.assertEqual(bang_definition, None)
|
self.assertEqual(bang_definition, None)
|
||||||
self.assertEqual(new_autocomplete, [])
|
self.assertEqual(new_autocomplete, [])
|
||||||
@ -114,7 +109,6 @@ class TestExternalBangJson(SearxTestCase):
|
|||||||
self.assertEqual(result, None)
|
self.assertEqual(result, None)
|
||||||
|
|
||||||
def test_get_bang_url(self):
|
def test_get_bang_url(self):
|
||||||
global TEST_DB
|
|
||||||
url = get_bang_url(SearchQuery('test', engineref_list=[], external_bang='example'), external_bangs_db=TEST_DB)
|
url = get_bang_url(SearchQuery('test', engineref_list=[], external_bang='example'), external_bangs_db=TEST_DB)
|
||||||
self.assertEqual(url, 'https://example.com/test')
|
self.assertEqual(url, 'https://example.com/test')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user