Skip to content

Conversation

@ynamkit13
Copy link

This PR refactors the memory management logic in memory.py by merging the functionality of _create_memory directly into _simple_add for cleaner, more maintainable code.
Closes #32.

Solution Description
Combined the logic of _create_memory into a single _simple_add function.
Removed the now-redundant _create_memory method.
Updated internal calls and maintained all original functionalities.
Verified all tests pass (make test): no errors, regressions, or failures.
Improved code readability and maintainability by consolidating memory creation workflow.

@CLAassistant
Copy link

CLAassistant commented Nov 22, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Author

@ynamkit13 ynamkit13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored memory logic by merging _create_memory into _simple_add, eliminating redundant code and simplifying function calls.
All original functionality is preserved; the code is now easier to maintain and extend.
Successfully removed unused/duplicate methods.
All tests pass after changes (make test), confirming the refactor did not introduce regressions.
Code formatting and linting were run according to project guidelines.
Documentation/comments are clear for future maintainers.

@Teingi
Copy link
Member

Teingi commented Nov 25, 2025

Great work, we will review it as soon as possible.

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.

[Enhancement]: clean code for memory.py?

3 participants