Closed SurajSanap closed 6 months ago
Hi @SurajSanap,
Not sure I see the code duplication removed in the PR, should handle_unsaved_file()
be called somewhere else as well?
Hi @SurajSanap, sorry I didn't mean to discourage you, your contribution is appreciated!
I was mostly wondering if wrapping that code in the handle_unsaved_file()
function meant there could be another place in the code where we could remove the duplication and call that function instead.
This pull request addresses the issue #2445, which involves refactoring duplicate code in the save method of the mu/logic.py file.
Changes Made:
Refactored the save method to eliminate duplicated code. Introduced a helper function, handle_unsaved_file, to encapsulate the logic for handling unsaved files and checking for shadow modules. Improved code readability and maintainability. Testing Done:
Tested the changes by running existing test cases and performing manual testing. Ensured that the refactored code functions as expected in various scenarios.
Closes #2445