chore: remove stale TODO and legacy comments (#2316)#2345
chore: remove stale TODO and legacy comments (#2316)#2345ajuijas wants to merge 2 commits intotopoteretes:mainfrom
Conversation
- Removed 5 legacy caching TODOs from cache_db_interface.py, test_fs_adapter_crud.py, and test_redis_adapter_crud.py referencing backward compatibility that was completed in PR topoteretes#2077. - Removed 1 outdated dynamic exception handling TODO attached to dead code in exceptions.py from PR topoteretes#567.
WalkthroughMostly comment/TODO text updates across multiple modules and tests; one behavioral-affecting change: removal of the base-class initializer call from EntityNotFoundError.init in exceptions.py. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cognee/infrastructure/databases/cache/cache_db_interface.py (1)
56-56: LGTM! TODO cleanup aligns with PR objectives.The removal of stale TODO comments from these backward-compatibility wrapper docstrings is appropriate and keeps the documentation concise. The functional delegation logic remains unchanged.
Optional enhancement for future consideration:
These backward-compatibility wrapper methods could benefit from more complete docstrings documenting their parameters and return values, similar to the abstract methods they delegate to (e.g.,
create_qa_entry,get_latest_qa_entries,get_all_qa_entries). However, this is out of scope for this cleanup PR.As per coding guidelines: "undocumented function definitions and class definitions in the project's Python code are assumed incomplete. Please consider suggesting a short summary of the code for any of these incomplete definitions as docstrings when reviewing."
Also applies to: 85-85, 96-96
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cognee/infrastructure/databases/cache/cache_db_interface.py` at line 56, Add brief, properly formatted docstrings to the backward-compatibility wrapper methods that currently lack documentation (the wrapper that delegates to create_qa_entry and the similar wrappers for get_latest_qa_entries and get_all_qa_entries) describing their parameters, return value, and that they delegate to the corresponding abstract methods; reference the wrapper method names (the create_qa_entry wrapper, get_latest_qa_entries wrapper, get_all_qa_entries wrapper) and mirror the essential param/return info from the delegated abstract methods to satisfy the project's undocumented-definition guideline.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@cognee/infrastructure/databases/cache/cache_db_interface.py`:
- Line 56: Add brief, properly formatted docstrings to the
backward-compatibility wrapper methods that currently lack documentation (the
wrapper that delegates to create_qa_entry and the similar wrappers for
get_latest_qa_entries and get_all_qa_entries) describing their parameters,
return value, and that they delegate to the corresponding abstract methods;
reference the wrapper method names (the create_qa_entry wrapper,
get_latest_qa_entries wrapper, get_all_qa_entries wrapper) and mirror the
essential param/return info from the delegated abstract methods to satisfy the
project's undocumented-definition guideline.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3c3d756d-0d69-4736-a41c-e69675e4b917
📒 Files selected for processing (4)
cognee/infrastructure/databases/cache/cache_db_interface.pycognee/infrastructure/databases/exceptions/exceptions.pycognee/tests/unit/infrastructure/databases/cache/test_fs_adapter_crud.pycognee/tests/unit/infrastructure/databases/cache/test_redis_adapter_crud.py
💤 Files with no reviewable changes (3)
- cognee/tests/unit/infrastructure/databases/cache/test_redis_adapter_crud.py
- cognee/infrastructure/databases/exceptions/exceptions.py
- cognee/tests/unit/infrastructure/databases/cache/test_fs_adapter_crud.py
Please make sure all the checkboxes are checked:
|
Description
This PR resolves issue #2316 by fully auditing and triaging the
TODOcomments across the codebase.Changes:
TODOcomments related to legacy caching and exception handling that were no longer relevant.TODOs, we created dedicated GitHub issues. I then updated the inline comments in the Python files to reference these new issue IDs (e.g., changingTODO:toTODO(#2350):).This cleans up the code and makes sure all pending work is tracked in GitHub issues instead.
Acceptance Criteria
TODO/FIXMEcomments in the codebase (issue Audit and triage TODO/FIXME comments into actionable issues or removal #2316).Type of Change
Pre-submission Checklist
CONTRIBUTING.md)DCO Affirmation
I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.