summaryrefslogtreecommitdiffstats
path: root/rtemsspec/items.py
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2023-01-03 11:27:36 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-01-03 13:36:14 +0100
commit4f9967157d97d5f01bdee81e0b9d6a1e3ed9c27d (patch)
tree903d7f7a51c993a9ea2418f2c37a6572decfad3c /rtemsspec/items.py
parentapplconfig: Changes for flake8 version 5.0.4 (diff)
downloadrtems-central-4f9967157d97d5f01bdee81e0b9d6a1e3ed9c27d.tar.bz2
Changes for pylint 2.13.9
Diffstat (limited to 'rtemsspec/items.py')
-rw-r--r--rtemsspec/items.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/rtemsspec/items.py b/rtemsspec/items.py
index 0aec25c7..2120a9ed 100644
--- a/rtemsspec/items.py
+++ b/rtemsspec/items.py
@@ -635,7 +635,7 @@ def _gather_spec_refinements(item: Item) -> Optional[_SpecType]:
def _load_yaml_data(path: str, uid: str) -> Any:
- with open(path, "r") as src:
+ with open(path, "r", encoding="utf-8") as src:
try:
data = yaml.safe_load(src.read())
except yaml.YAMLError as err:
@@ -648,7 +648,7 @@ def _load_yaml_data(path: str, uid: str) -> Any:
def _load_json_data(path: str, uid: str) -> Any:
- with open(path, "r") as src:
+ with open(path, "r", encoding="utf-8") as src:
try:
data = json.load(src)
except json.JSONDecodeError as err:
@@ -788,7 +788,7 @@ class ItemCache:
def save_data(self, path: str, data: Any) -> None:
""" Saves the item data to the file specified by path. """
- with open(path, "w") as file:
+ with open(path, "w", encoding="utf-8") as file:
data2 = {}
for key, value in data.items():
if not key.startswith("_"):