forked from Icycoide/searxng
[mod] comprehensive revision of the searxng_extra/update/ scripts
- pylint all scripts - fix some errors reported by pyright - from searx.data import data_dir (Path.open) - fix import from pygments.formatters.html NOTE: none functional changes! Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
0ffec440b2
commit
ce4aaf6cad
10 changed files with 51 additions and 61 deletions
|
@ -144,9 +144,9 @@ def write_languages_file(sxng_tag_list):
|
|||
|
||||
item = (
|
||||
sxng_tag,
|
||||
sxng_locale.get_language_name().title(),
|
||||
sxng_locale.get_language_name().title(), # type: ignore
|
||||
sxng_locale.get_territory_name() or '',
|
||||
sxng_locale.english_name.split(' (')[0],
|
||||
sxng_locale.english_name.split(' (')[0] if sxng_locale.english_name else '',
|
||||
UnicodeEscape(flag),
|
||||
)
|
||||
|
||||
|
@ -154,7 +154,7 @@ def write_languages_file(sxng_tag_list):
|
|||
|
||||
language_codes = tuple(language_codes)
|
||||
|
||||
with open(languages_file, 'w', encoding='utf-8') as new_file:
|
||||
with languages_file.open('w', encoding='utf-8') as new_file:
|
||||
file_content = "{header} {language_codes}{footer}".format(
|
||||
header=languages_file_header,
|
||||
language_codes=pformat(language_codes, width=120, indent=4)[1:-1],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue