Skip to content

Commit 1017f14

Browse files
committed
Fix Pylint errors
1 parent 260952d commit 1017f14

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

climateset/download/cmip6_downloader.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,12 @@ def download_from_model_single_var( # noqa: C901
9494

9595
if len(variants) < 1:
9696
self.logger.info(
97-
"No items were found for this request. Please check on the esgf server if the combination of your model/scenarios/variables exists."
97+
"No items were found for this request. Please check on the esgf server if the combination of your "
98+
"model/scenarios/variables exists."
9899
)
99100
raise ValueError(
100-
"Downloader did not find any items on esgf for your request with: Project {project}, Experiment {experiment}, Model {self.model}, Variable {variable}."
101+
f"Downloader did not find any items on esgf for your request with: Project {project}, "
102+
f"Experiment {experiment}, Model {model}, Variable {variable}."
101103
)
102104

103105
self.logger.info(f"Available variants : {variants}\n")

climateset/download/downloader_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def generate_config_dict(self):
117117
def generate_config_file(self, config_file_name: str, config_path: Union[str, Path] = CONFIGS) -> None:
118118
config_full_path = self._handle_yaml_config_path(config_file_name, config_path)
119119
data = self.generate_config_dict()
120-
with open(config_full_path, "w") as config_file:
120+
with open(config_full_path, "w", encoding="utf-8") as config_file:
121121
yaml.dump(data, config_file, indent=2)
122122

123123
def add_to_config_file(self, config_file_name: str, config_path: Union[str, Path] = CONFIGS) -> None:
@@ -128,7 +128,7 @@ def add_to_config_file(self, config_file_name: str, config_path: Union[str, Path
128128
existing_config.update(existing_config)
129129
new_config = self.generate_config_dict()
130130
existing_config.update(new_config)
131-
with open(config_full_path, "w") as config_file:
131+
with open(config_full_path, "w", encoding="utf-8") as config_file:
132132
yaml.dump(existing_config, config_file, indent=2)
133133

134134

0 commit comments

Comments
 (0)