chore: migrate to ruff (#4305)

* base requirements

* autofix

* Configure ruff for Python linting and formatting

- Set up minimal ruff configuration with basic checks (E, W, F, I)
- Add temporary ignores for common issues during migration
- Configure pre-commit hooks to use ruff with pass_filenames
- This enables gradual migration from black to ruff

* Delete sdj

* autofixed only

* migrate lint action

* more autofixed

* more fixes

* change precommit

* try changing the hook

* try this stuff
This commit is contained in:
Kian Jones
2025-08-29 11:11:19 -07:00
committed by GitHub
parent e6c2c2121e
commit fecf6decfb
121 changed files with 627 additions and 666 deletions

View File

@@ -61,13 +61,13 @@ def archival_memory_text_search(self, query: str, page: Optional[int] = 0) -> Op
try:
page = int(page)
except:
raise ValueError(f"'page' argument must be an integer")
raise ValueError("'page' argument must be an integer")
count = 10
results = self.persistence_manager.archival_memory.storage.query_text(query, limit=count, offset=page * count)
total = len(results)
num_pages = math.ceil(total / count) - 1 # 0 index
if len(results) == 0:
results_str = f"No results found."
results_str = "No results found."
else:
results_pref = f"Showing {len(results)} of {total} results (page {page}/{num_pages}):"
results_formatted = [f"memory: {d.text}" for d in results]
@@ -253,8 +253,8 @@ if __name__ == "__main__":
# overwrite
kv_d[current_key] = next_key
print(f"Nested {i+1}")
print(f"Done")
print(f"Nested {i + 1}")
print("Done")
def get_nested_key(original_key, kv_d):
key = original_key