Skip to content

Remove unreachable memory logging code checking for dict structure #2905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

idokenan2000
Copy link

@idokenan2000 idokenan2000 commented Jun 3, 2025

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

  • 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

  • Unit Test

Checklist:

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

Maintainer Checklist

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

The `memories` variable is always a list after being processed from `hits.points`,
making the `isinstance(memories, dict) and 'results' in memories` block unreachable.

This commit removes the dead code path, simplifying the memory access logging logic
and reducing confusion for future contributors.
@CLAassistant
Copy link

CLAassistant commented Jun 3, 2025

CLA assistant check
All committers have signed the CLA.

@deshraj deshraj requested a review from whysosaket June 3, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants