Skip to content

Commit 681cdf4

Browse files
committed
Add encoding for open()
1 parent a313fda commit 681cdf4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/03-remote-system/local_adapter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class LocalAdapter(DiffSync):
2929

3030
def load(self, filename=COUNTRIES_FILE): # pylint: disable=arguments-differ
3131
"""Load all regions and countries from a local JSON file."""
32-
with open(filename, "r") as data_file: # pylint: disable=unspecified-encoding
32+
with open(filename, "r", encoding="UTF-8") as data_file:
3333
countries = json.load(data_file)
3434

3535
# Load all regions first

tasks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
def project_ver():
2929
"""Find version from pyproject.toml to use for docker image tagging."""
30-
with open("pyproject.toml") as file: # pylint: disable=unspecified-encoding
30+
with open("pyproject.toml", encoding="UTF-8") as file:
3131
return toml.load(file)["tool"]["poetry"].get("version", "latest")
3232

3333

0 commit comments

Comments
 (0)