chore: black

This commit is contained in:
psychedelicious 2023-08-16 11:38:47 +10:00
parent 60c2c877d7
commit 8b1ec2685f
2 changed files with 5 additions and 5 deletions

View File

@ -67,7 +67,7 @@ IMAGE_DTO_COLS = ", ".join(
"created_at", "created_at",
"updated_at", "updated_at",
"deleted_at", "deleted_at",
"starred" "starred",
], ],
) )
) )
@ -140,7 +140,7 @@ class ImageRecordStorageBase(ABC):
node_id: Optional[str], node_id: Optional[str],
metadata: Optional[dict], metadata: Optional[dict],
is_intermediate: bool = False, is_intermediate: bool = False,
starred: bool = False starred: bool = False,
) -> datetime: ) -> datetime:
"""Saves an image record.""" """Saves an image record."""
pass pass
@ -204,7 +204,7 @@ class SqliteImageRecordStorage(ImageRecordStorageBase):
self._cursor.execute("PRAGMA table_info(images)") self._cursor.execute("PRAGMA table_info(images)")
columns = [column[1] for column in self._cursor.fetchall()] columns = [column[1] for column in self._cursor.fetchall()]
if "starred" not in columns: if "starred" not in columns:
self._cursor.execute( self._cursor.execute(
"""--sql """--sql
@ -529,7 +529,7 @@ class SqliteImageRecordStorage(ImageRecordStorageBase):
node_id: Optional[str], node_id: Optional[str],
metadata: Optional[dict], metadata: Optional[dict],
is_intermediate: bool = False, is_intermediate: bool = False,
starred: bool = False starred: bool = False,
) -> datetime: ) -> datetime:
try: try:
metadata_json = None if metadata is None else json.dumps(metadata) metadata_json = None if metadata is None else json.dumps(metadata)

View File

@ -132,5 +132,5 @@ def deserialize_image_record(image_dict: dict) -> ImageRecord:
updated_at=updated_at, updated_at=updated_at,
deleted_at=deleted_at, deleted_at=deleted_at,
is_intermediate=is_intermediate, is_intermediate=is_intermediate,
starred=starred starred=starred,
) )