gabriel / muse public
refactor patch dev
AI Agent gabriel · 158 days ago · Apr 19, 2026 · Diff

refactor: standardize --format→--json/-j for cherry-pick, revert, reset

Same pattern applied: replace dual --format/-f + --json (store_const) with single canonical --json/-j (store_true, dest=json_out).

All fmt: str references removed from run() and internal helpers. TDD: parser tests updated/added across all three commands and their test files.

sha256:33829aa4a8c0f6555f263d09b279d1a1c36f082c2965d506abbc52fd71f2dfad sha
+15 ~18 −10 symbols
sha256:8935c090450e82d18e936a8d74417bef2d0c838bc9dc8cdb21f84784b79d1d36 snapshot
+15
symbols added
~18
symbols modified
−10
symbols removed
0
dead code introduced
Semantic Changes 43 symbols
~ muse/cli/commands/cherry_pick.py .py 2 symbols modified
~ muse/cli/commands/reset.py .py 2 symbols modified
~ muse/cli/commands/revert.py .py 2 symbols modified
~ tests/test_cmd_cherry_pick.py .py 5 symbols added, 2 symbols modified
+ TestRegisterFlags class class TestRegisterFlags L93–112
+ _parse method method _parse L94–100
+ test_default_json_out_is_false method method test_default_json_out_is_false L102–104
+ test_j_shorthand_sets_json_out method method test_j_shorthand_sets_json_out L110–112
+ test_json_flag_sets_json_out method method test_json_flag_sets_json_out L106–108
~ tests/test_cmd_reset_hardening.py .py 5 symbols added, 5 symbols removed, 3 symbols modified
− test_unknown_format_error_to_stderr method method test_unknown_format_error_to_stderr L211–214
− test_default_fmt_is_text method method test_default_fmt_is_text L104–112
− test_format_json_flag method method test_format_json_flag L124–132
− test_json_flag_sets_fmt method method test_json_flag_sets_fmt L114–122
− test_unknown_format_sanitized_in_stderr method method test_unknown_format_sanitized_in_stderr L486–489
+ test_unknown_flag_exits_nonzero method method test_unknown_flag_exits_nonzero L193–195
+ test_default_json_out_is_false method method test_default_json_out_is_false L104–106
+ test_j_shorthand_sets_json_out method method test_j_shorthand_sets_json_out L112–114
+ test_json_flag_sets_json_out method method test_json_flag_sets_json_out L108–110
+ test_unknown_flag_with_ansi_exits_nonzero method method test_unknown_flag_with_ansi_exits_nonzero L467–470
~ tests/test_cmd_revert_hardening.py .py 5 symbols added, 5 symbols removed, 3 symbols modified
− test_bad_format_to_stderr method method test_bad_format_to_stderr L246–249
− test_format_explicit_text method method test_format_explicit_text L158–161
− test_format_json_shorthand method method test_format_json_shorthand L153–156
− test_invalid_format_error_in_stderr method method test_invalid_format_error_in_stderr L716–719
− test_invalid_format_exits_1_to_stderr method method test_invalid_format_exits_1_to_stderr L711–714
+ test_unknown_flag_exits_nonzero method method test_unknown_flag_exits_nonzero L248–250
+ test_default_json_out_is_false method method test_default_json_out_is_false L161–163
+ test_j_shorthand_sets_json_out method method test_j_shorthand_sets_json_out L157–159
+ test_json_flag_sets_json_out method method test_json_flag_sets_json_out L153–155
+ test_unknown_flag_exits_nonzero_security method method test_unknown_flag_exits_nonzero_security L712–714
← Older Oldest on dev
All commits
Newer → Latest on dev

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:33829aa4a8c0f6555f263d09b279d1a1c36f082c2965d506abbc52fd71f2dfad --body "your comment"