diff --git a/tilecloud_chain/multitilestore.py b/tilecloud_chain/multitilestore.py index fd87cf618..95988806e 100644 --- a/tilecloud_chain/multitilestore.py +++ b/tilecloud_chain/multitilestore.py @@ -114,6 +114,15 @@ def apply(key: tuple[str, str], tiles: Iterator[Tile]) -> Iterator[Tile]: return chain.from_iterable(starmap(apply, groupby(tiles, self._get_layer))) + def __str__(self) -> str: + """Return a string representation of the object.""" + stores = {store.__class__.__name__ for store in self.stores.values() if store is not None} + return f"{self.__class__.__name__}({', '.join(stores)})" + + def __repr__(self) -> str: + """Return a string representation of the object.""" + return str(self) + @staticmethod def _get_layer(tile: Tile | None) -> tuple[str, str]: assert tile is not None