diff --git a/tilecloud_chain/__init__.py b/tilecloud_chain/__init__.py index cb6c093a2..d7f536ce9 100644 --- a/tilecloud_chain/__init__.py +++ b/tilecloud_chain/__init__.py @@ -65,7 +65,7 @@ _GEOMS_GET_SUMMARY = Summary("tilecloud_chain_geoms_get", "Geoms filter get", ["layer", "host"]) -def formated_metadata(tile: Tile) -> str: +def formatted_metadata(tile: Tile) -> str: """Get human readable string of the metadata.""" metadata = dict(tile.metadata) @@ -74,7 +74,7 @@ def formated_metadata(tile: Tile) -> str: return " ".join([f"{k}={metadata[k]}" for k in sorted(metadata.keys())]) -setattr(Tile, "formated_metadata", property(formated_metadata)) +setattr(Tile, "formated_metadata", property(formatted_metadata)) def add_common_options( @@ -1573,8 +1573,8 @@ def quote(arg: str) -> str: if " " in arg or "'" in arg or '"' in arg: if "'" in arg: if '"' in arg: - formated_arg = arg.replace("'", "\\'") - return f"'{formated_arg}'" + formatted_arg = arg.replace("'", "\\'") + return f"'{formatted_arg}'" return f'"{arg}"' else: return f"'{arg}'" diff --git a/tilecloud_chain/generate.py b/tilecloud_chain/generate.py index 3b3121bc0..808cd2c94 100644 --- a/tilecloud_chain/generate.py +++ b/tilecloud_chain/generate.py @@ -330,13 +330,13 @@ def generate_resume(self, layer_name: Optional[str]) -> None: assert config is not None layer = config.config["layers"][layer_name] all_dimensions = self._gene.get_all_dimensions(layer) - formated_dimensions = " - ".join( + formatted_dimensions = " - ".join( [", ".join(["=".join(d) for d in dimensions.items()]) for dimensions in all_dimensions] ) suffix = ( "" if ((len(all_dimensions) == 1 and len(all_dimensions[0]) == 0) or layer["type"] != "wms") - else f" ({formated_dimensions})" + else f" ({formatted_dimensions})" ) message = [f"The tile generation of layer '{layer_name}{suffix}' is finish"] else: