Skip to content

Commit

Permalink
[pylint] Pylint 2.10 - unspecified-encoding
Browse files Browse the repository at this point in the history
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] pylint-dev/pylint#3826

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
  • Loading branch information
return42 committed Aug 31, 2021
1 parent b83c14c commit e856b56
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions searx/version.py
Expand Up @@ -126,8 +126,8 @@ def get_git_version():
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:
Expand Down
2 changes: 1 addition & 1 deletion searx_extra/update/update_external_bangs.py
Expand Up @@ -154,5 +154,5 @@ def get_bangs_filename():
'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)
2 changes: 1 addition & 1 deletion searx_extra/update/update_osm_keys_tags.py
Expand Up @@ -205,5 +205,5 @@ def get_osm_tags_filename():
'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)

0 comments on commit e856b56

Please sign in to comment.