Add "frozen" variant of Command class, for base commands#5011
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a FrozenCommand class to prevent in-place modifications of base commands across various package managers. The review feedback points out that returning Self from Command.__add__ incorrectly propagates the frozen state to new command instances created via addition. Change the return type of __add__ to Command and update the corresponding unit tests to assert that addition results in a mutable Command.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Somme commands serve as basis for other commands, and we must prevent modification of these base commands. This is related to the recent fix of `Command.__iadd__`, and even more recent #5001 bug.
Somme commands serve as basis for other commands, and we must prevent
modification of these base commands. This is related to the recent fix
of
Command.__iadd__, and even more recent #5001 bug.