diff --git a/tilecloud_chain/__init__.py b/tilecloud_chain/__init__.py index b3fb58f01..e83cdc7d8 100644 --- a/tilecloud_chain/__init__.py +++ b/tilecloud_chain/__init__.py @@ -74,11 +74,11 @@ def formatted_metadata(tile: Tile) -> str: """Get human readable string of the metadata.""" metadata = dict(tile.metadata) if "tiles" in metadata: - metadata["tiles"] = metadata["tiles"].keys() # type: ignore + metadata["tiles"] = metadata["tiles"].keys() # type: ignore[attr-defined] return " ".join([f"{k}={metadata[k]}" for k in sorted(metadata.keys())]) -Tile.formated_metadata = property(formatted_metadata) +Tile.formated_metadata = property(formatted_metadata) # type: ignore[method-assign,assignment] def add_common_options( @@ -254,9 +254,9 @@ def __call__(self, tile: Tile | None) -> Tile | None: _LOGGER.debug( "[%s] %s in %s", tilecoord, - func.time_message if getattr(func, "time_message", None) is not None else func, + func.time_message if getattr(func, "time_message", None) is not None else func, # type: ignore str(datetime.now() - n), - ) # type: ignore + ) if tile is None: _LOGGER.debug("[%s] Drop", tilecoord) return None @@ -456,7 +456,7 @@ def __init__( "Options", ["verbose", "debug", "quiet", "bbox", "zoom", "test", "near", "time", "geom", "ignore_error"], )( - False, + False, # type: ignore False, False, None, @@ -465,7 +465,7 @@ def __init__( None, None, True, - False, # type: ignore + False, ) del options if not hasattr(self.options, "bbox"): diff --git a/tilecloud_chain/store/postgresql.py b/tilecloud_chain/store/postgresql.py index b4ef83a5b..dc88f5627 100644 --- a/tilecloud_chain/store/postgresql.py +++ b/tilecloud_chain/store/postgresql.py @@ -538,8 +538,9 @@ def list(self) -> Iterator[Tile]: sqlalchemy_tile.status = _STATUS_PENDING # type: ignore[assignment] sqlalchemy_tile.started_at = datetime.now() # type: ignore[assignment] meta_tile = _decode_message( - sqlalchemy_tile.meta_tile, postgresql_id=sqlalchemy_tile.id - ) # type: ignore[arg-type] + sqlalchemy_tile.meta_tile, # type: ignore[arg-type] + postgresql_id=sqlalchemy_tile.id, + ) session.commit() yield meta_tile except Exception: # pylint: disable=broad-except