Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
sbrunner committed Nov 14, 2024
1 parent 0a4adba commit 5e0ab5a
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions tilecloud_chain/__init__.py
Original file line number Diff line number Diff line change
@@ -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"):
5 changes: 3 additions & 2 deletions tilecloud_chain/store/postgresql.py
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5e0ab5a

Please sign in to comment.