Skip to content

Commit 922ccc5

Browse files
committed
style: reformat
1 parent 9f09d34 commit 922ccc5

File tree

4 files changed

+17
-21
lines changed

4 files changed

+17
-21
lines changed

docs/modules/mem_reader.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -147,20 +147,20 @@ Documents are chunked and summarized to create searchable knowledge items.
147147

148148
We use [`markitdown`](https://github.com/microsoft/markitdown) to convert files to Markdown format texts.
149149

150-
**MarkItDown currently supports the conversion from:**
150+
**MarkItDown currently supports the conversion from:**
151151

152152
```
153-
PDF
154-
PowerPoint
155-
Word
156-
Excel
157-
Images (EXIF metadata and OCR)
158-
Audio (EXIF metadata and speech transcription)
159-
HTML
160-
Text-based formats (CSV, JSON, XML)
161-
ZIP files (iterates over contents)
162-
YouTube URLs
163-
EPUBs
153+
PDF
154+
PowerPoint
155+
Word
156+
Excel
157+
Images (EXIF metadata and OCR)
158+
Audio (EXIF metadata and speech transcription)
159+
HTML
160+
Text-based formats (CSV, JSON, XML)
161+
ZIP files (iterates over contents)
162+
YouTube URLs
163+
EPUBs
164164
... and more!
165165
```
166166
*(Content sourced from [MarkItDown GitHub repository](https://github.com/microsoft/markitdown))*

src/memos/graph_dbs/neo4j.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -766,8 +766,7 @@ def get_structure_optimization_candidates(self, scope: str) -> list[dict]:
766766

767767
with self.driver.session(database=self.db_name) as session:
768768
results = session.run(query, {"scope": scope})
769-
return [_parse_node({"id": record["id"], **dict(record["node"])})
770-
for record in results]
769+
return [_parse_node({"id": record["id"], **dict(record["node"])}) for record in results]
771770

772771
def drop_database(self) -> None:
773772
"""

src/memos/memories/textual/tree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,4 +288,4 @@ def _cleanup_old_backups(root_dir: Path, keep_last_n: int) -> None:
288288
shutil.rmtree(old_dir)
289289
logger.info(f"Deleted old backup directory: {old_dir}")
290290
except Exception as e:
291-
logger.warning(f"Failed to delete backup {old_dir}: {e}")
291+
logger.warning(f"Failed to delete backup {old_dir}: {e}")

src/memos/memories/textual/tree_text_memory/organize/reorganizer.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,8 @@ def _run_structure_organizer_loop(self):
106106
Use schedule library to periodically trigger structure optimization.
107107
This runs until the stop flag is set.
108108
"""
109-
schedule.every(30).seconds.do(self.optimize_structure,
110-
scope="LongTermMemory")
111-
schedule.every(30).seconds.do(self.optimize_structure,
112-
scope="UserMemory")
109+
schedule.every(30).seconds.do(self.optimize_structure, scope="LongTermMemory")
110+
schedule.every(30).seconds.do(self.optimize_structure, scope="UserMemory")
113111

114112
logger.info("Structure optimizer schedule started.")
115113
while not getattr(self, "_stop_scheduler", False):
@@ -176,8 +174,7 @@ def optimize_structure(self, scope: str = "LongTermMemory", local_tree_threshold
176174
return
177175

178176
if self.graph_store.count_nodes(scope) == 0:
179-
logger.debug(
180-
f"[GraphStructureReorganizer] No nodes for scope={scope}. Skip.")
177+
logger.debug(f"[GraphStructureReorganizer] No nodes for scope={scope}. Skip.")
181178
return
182179

183180
self._is_optimizing[scope] = True

0 commit comments

Comments
 (0)