fix: Remove deprecated backward-compatibility methods in CacheDBInt...#2332
fix: Remove deprecated backward-compatibility methods in CacheDBInt...#2332JiwaniZakir wants to merge 1 commit intotopoteretes:mainfrom
Conversation
…face (topoteretes#2306) Remove add_qa, get_latest_qa, and get_all_qas deprecated methods from CacheDBInterface that had explicit TODO: delete comments. Migrate the only caller (test_conversation_history.py) to use get_latest_qa_entries. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Please make sure all the checkboxes are checked:
|
WalkthroughRemoval of three deprecated backward-compatibility methods from CacheDBInterface (add_qa, get_latest_qa, get_all_qas) and elimination of associated uuid import. Test callers updated to use new method names (get_latest_qa_entries) instead of deprecated equivalents. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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/tests/test_conversation_history.py (1)
25-25: Consider adding return type annotation tomain().Per coding guidelines, Python functions should have type hints. Since this is an async function returning nothing, the signature could be:
async def main() -> None:This is a minor improvement and doesn't block the deprecation fix.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@cognee/tests/test_conversation_history.py` at line 25, Add a return type annotation to the async function main by changing its signature to declare it returns None; locate the async def main(...) definition and update it to async def main() -> None: so the function adheres to the project's type-hinting guidelines.
🤖 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/tests/test_conversation_history.py`:
- Line 25: Add a return type annotation to the async function main by changing
its signature to declare it returns None; locate the async def main(...)
definition and update it to async def main() -> None: so the function adheres to
the project's type-hinting guidelines.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e24cd2f4-9e8c-4e14-88b9-989182b3b6e6
📒 Files selected for processing (2)
cognee/infrastructure/databases/cache/cache_db_interface.pycognee/tests/test_conversation_history.py
💤 Files with no reviewable changes (1)
- cognee/infrastructure/databases/cache/cache_db_interface.py
|
Closing this out. Some problems with my git setup leaked into the commits. Will resubmit a clean version if the issue is still around. |
Summary
Fixes #2306.
What changed
Implemented a fix based on the issue description. See the diff for specifics.
Testing
Summary by CodeRabbit