forked from zaclys/searxng
Merge pull request #273 from searxng/dependabot/pip/master/pylint-2.10.2
Bump pylint from 2.9.6 to 2.10.2
This commit is contained in:
commit
1e942435be
|
@ -2,7 +2,7 @@ mock==4.0.3
|
|||
nose2[coverage_plugin]==0.10.0
|
||||
cov-core==1.15.0
|
||||
pycodestyle==2.7.0
|
||||
pylint==2.9.6
|
||||
pylint==2.10.2
|
||||
splinter==0.15.0
|
||||
transifex-client==0.14.3
|
||||
selenium==3.141.0
|
||||
|
|
|
@ -66,7 +66,7 @@ filter_mapping = {
|
|||
def scrap_out_thumbs(dom):
|
||||
"""Scrap out thumbnail data from <script> tags.
|
||||
"""
|
||||
ret_val = dict()
|
||||
ret_val = {}
|
||||
for script in eval_xpath(dom, '//script[contains(., "_setImgSrc(")]'):
|
||||
_script = script.text
|
||||
# _setImgSrc('0','data:image\/jpeg;base64,\/9j\/4AAQSkZJR ....');
|
||||
|
|
|
@ -80,7 +80,7 @@ def _re(regexpr):
|
|||
def scrap_out_thumbs(dom):
|
||||
"""Scrap out thumbnail data from <script> tags.
|
||||
"""
|
||||
ret_val = dict()
|
||||
ret_val = {}
|
||||
thumb_name = 'vidthumb'
|
||||
|
||||
for script in eval_xpath_list(dom, '//script[contains(., "_setImagesSrc")]'):
|
||||
|
|
|
@ -12,7 +12,7 @@ from json import loads, dumps
|
|||
base_url = 'http://localhost:7700'
|
||||
index = ''
|
||||
auth_key = ''
|
||||
facet_filters = list()
|
||||
facet_filters = []
|
||||
_search_url = ''
|
||||
result_template = 'key-value.html'
|
||||
categories = ['general']
|
||||
|
|
|
@ -172,7 +172,7 @@ async def stream_chunk_to_queue(network, queue, method, url, **kwargs):
|
|||
async for chunk in response.aiter_raw(65536):
|
||||
if len(chunk) > 0:
|
||||
queue.put(chunk)
|
||||
except httpx.ResponseClosed as e:
|
||||
except httpx.ResponseClosed:
|
||||
# the response was closed
|
||||
pass
|
||||
except (httpx.HTTPError, OSError, h2.exceptions.ProtocolError) as e:
|
||||
|
|
|
@ -285,7 +285,7 @@ class EnginesSetting(SwitchableSetting):
|
|||
transformed_choices = []
|
||||
for engine_name, engine in self.choices.items(): # pylint: disable=no-member,access-member-before-definition
|
||||
for category in engine.categories:
|
||||
transformed_choice = dict()
|
||||
transformed_choice = {}
|
||||
transformed_choice['default_on'] = not engine.disabled
|
||||
transformed_choice['id'] = '{}__{}'.format(engine_name, category)
|
||||
transformed_choices.append(transformed_choice)
|
||||
|
@ -296,7 +296,7 @@ class EnginesSetting(SwitchableSetting):
|
|||
|
||||
def transform_values(self, values):
|
||||
if len(values) == 1 and next(iter(values)) == '':
|
||||
return list()
|
||||
return []
|
||||
transformed_values = []
|
||||
for value in values:
|
||||
engine, category = value.split('__')
|
||||
|
@ -311,7 +311,7 @@ class PluginsSetting(SwitchableSetting):
|
|||
super()._post_init()
|
||||
transformed_choices = []
|
||||
for plugin in self.choices: # pylint: disable=access-member-before-definition
|
||||
transformed_choice = dict()
|
||||
transformed_choice = {}
|
||||
transformed_choice['default_on'] = plugin.default_on
|
||||
transformed_choice['id'] = plugin.id
|
||||
transformed_choices.append(transformed_choice)
|
||||
|
|
|
@ -126,8 +126,8 @@ GIT_URL = "{GIT_URL}"
|
|||
GIT_BRANCH = "{GIT_BRANCH}"
|
||||
"""
|
||||
with open(
|
||||
os.path.join(os.path.dirname(__file__), "version_frozen.py"), "w"
|
||||
) as f:
|
||||
os.path.join(os.path.dirname(__file__), "version_frozen.py"),
|
||||
"w", encoding="utf8") as f:
|
||||
f.write(python_code)
|
||||
print(f"{f.name} created")
|
||||
else:
|
||||
|
|
|
@ -154,5 +154,5 @@ if __name__ == '__main__':
|
|||
'version': bangs_version,
|
||||
'trie': parse_ddg_bangs(fetch_ddg_bangs(bangs_url))
|
||||
}
|
||||
with open(get_bangs_filename(), 'w') as fp:
|
||||
with open(get_bangs_filename(), 'w', encoding="utf8") as fp:
|
||||
json.dump(output, fp, ensure_ascii=False, indent=4)
|
||||
|
|
|
@ -205,5 +205,5 @@ if __name__ == '__main__':
|
|||
'keys': optimize_keys(get_keys()),
|
||||
'tags': optimize_tags(get_tags()),
|
||||
}
|
||||
with open(get_osm_tags_filename(), 'w') as f:
|
||||
with open(get_osm_tags_filename(), 'w', encoding="utf8") as f:
|
||||
json.dump(result, f, indent=4, ensure_ascii=False)
|
||||
|
|
|
@ -114,9 +114,9 @@ class TestUtils(SearxTestCase):
|
|||
def test_ecma_unscape(self):
|
||||
self.assertEqual(utils.ecma_unescape('text%20with%20space'), 'text with space')
|
||||
self.assertEqual(utils.ecma_unescape('text using %xx: %F3'),
|
||||
u'text using %xx: ó')
|
||||
'text using %xx: ó')
|
||||
self.assertEqual(utils.ecma_unescape('text using %u: %u5409, %u4E16%u754c'),
|
||||
u'text using %u: 吉, 世界')
|
||||
'text using %u: 吉, 世界')
|
||||
|
||||
|
||||
class TestHTMLTextExtractor(SearxTestCase):
|
||||
|
|
Loading…
Reference in New Issue