mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
[pylint] Pylint 2.10 - unspecified-encoding
Pylint 2.10 added new default checks [1]: unspecified-encoding: Emitted when open() is called without specifying an encoding [2] [1] https://pylint.pycqa.org/en/latest/whatsnew/2.10.html [2] https://github.com/PyCQA/pylint/issues/3826 Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
b83c14cf6b
commit
e856b563dd
@ -126,8 +126,8 @@ GIT_URL = "{GIT_URL}"
|
|||||||
GIT_BRANCH = "{GIT_BRANCH}"
|
GIT_BRANCH = "{GIT_BRANCH}"
|
||||||
"""
|
"""
|
||||||
with open(
|
with open(
|
||||||
os.path.join(os.path.dirname(__file__), "version_frozen.py"), "w"
|
os.path.join(os.path.dirname(__file__), "version_frozen.py"),
|
||||||
) as f:
|
"w", encoding="utf8") as f:
|
||||||
f.write(python_code)
|
f.write(python_code)
|
||||||
print(f"{f.name} created")
|
print(f"{f.name} created")
|
||||||
else:
|
else:
|
||||||
|
@ -154,5 +154,5 @@ if __name__ == '__main__':
|
|||||||
'version': bangs_version,
|
'version': bangs_version,
|
||||||
'trie': parse_ddg_bangs(fetch_ddg_bangs(bangs_url))
|
'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)
|
json.dump(output, fp, ensure_ascii=False, indent=4)
|
||||||
|
@ -205,5 +205,5 @@ if __name__ == '__main__':
|
|||||||
'keys': optimize_keys(get_keys()),
|
'keys': optimize_keys(get_keys()),
|
||||||
'tags': optimize_tags(get_tags()),
|
'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)
|
json.dump(result, f, indent=4, ensure_ascii=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user