mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Remove unreachable memory logging code checking for dict structure

Open idokenan2000 opened this issue 6 months ago • 1 comments

Description

This PR removes unreachable legacy code that attempted to log memory access from a dict structure with a results key. After the memories variable is processed into a list of dictionaries via list comprehension, it can no longer be a dict, making the conditional isinstance(memories, dict) always false.

This simplifies the control flow and avoids confusion for future contributors.

No functional behavior has changed.

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [x] Unit Test

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules
  • [x] I have checked my code and corrected any misspellings

Maintainer Checklist

  • [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
  • [ ] Made sure Checks passed

idokenan2000 avatar Jun 03 '25 22:06 idokenan2000

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 03 '25 22:06 CLAassistant