Fix: ruff format with CI-pinned version (0.4.x)
This commit is contained in:
@@ -35,13 +35,8 @@ def _fix_blob_seq_ids(palace_path: str):
|
||||
continue
|
||||
if not rows:
|
||||
continue
|
||||
updates = [
|
||||
(int.from_bytes(blob, byteorder="big"), rowid)
|
||||
for rowid, blob in rows
|
||||
]
|
||||
conn.executemany(
|
||||
f"UPDATE {table} SET seq_id = ? WHERE rowid = ?", updates
|
||||
)
|
||||
updates = [(int.from_bytes(blob, byteorder="big"), rowid) for rowid, blob in rows]
|
||||
conn.executemany(f"UPDATE {table} SET seq_id = ? WHERE rowid = ?", updates)
|
||||
logger.info("Fixed %d BLOB seq_ids in %s", len(updates), table)
|
||||
conn.commit()
|
||||
except Exception:
|
||||
@@ -76,9 +71,7 @@ class ChromaCollection(BaseCollection):
|
||||
class ChromaBackend:
|
||||
"""Factory for MemPalace's default ChromaDB backend."""
|
||||
|
||||
def get_collection(
|
||||
self, palace_path: str, collection_name: str, create: bool = False
|
||||
):
|
||||
def get_collection(self, palace_path: str, collection_name: str, create: bool = False):
|
||||
if not create and not os.path.isdir(palace_path):
|
||||
raise FileNotFoundError(palace_path)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user