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

refactor(cli): normalize --json/-j flag on name_rev; expand audit doc

- name_rev: replace --format/-f + store_const with --json/-j store_true - name_rev: rename _emit_error(fmt) → _emit_error(json_out: bool) - name_rev: remove _FORMAT_CHOICES constant - test_cmd_name_rev: add TestRegisterFlags; add _nr_text() helper; update all format-dependent tests to use canonical pattern - docs/sprint-docstring.md: renamed to CLI Audit; added j/sf/ft columns; added cross-command flag convention table; pre-populated j column from grep scan (40 commands still need --json/-j conversion)

sha256:bd8ec25260aba5ee4d21d6a40d052dbedce1b4f219c7ee1017a61240defa61bb sha
+16 ~16 −8 symbols
sha256:784a3197e6187ef6cfb43e8eddce737d7718ff371f48e5322d76e1d339b4f661 snapshot
+16
symbols added
~16
symbols modified
−8
symbols removed
0
dead code introduced
Semantic Changes 40 symbols
~ docs/sprint-docstring.md .md 6 symbols added, 4 symbols removed, 1 symbol modified
Docstring Sprint — Non-MIDI Commands section Docstring Sprint — Non-MIDI Commands L1–197
Commands (alphabetical, MIDI excluded) section Commands (alphabetical, MIDI excluded) L35–190
table@L37 section table@L37 L37–187
Status legend section Status legend L24–35
+ CLI Audit — Non-MIDI Commands section CLI Audit — Non-MIDI Commands L1–231
+ Commands (alphabetical, MIDI excluded) section Commands (alphabetical, MIDI excluded) L69–224
+ table@L71 section table@L71 L71–221
+ Cross-command flag conventions section Cross-command flag conventions L44–69
+ table@L48 section table@L48 L48–66
+ Status legend section Status legend L33–44
~ muse/cli/commands/name_rev.py .py 1 symbol removed, 3 symbols modified
_FORMAT_CHOICES variable variable _FORMAT_CHOICES L123–123
~ run
~ tests/test_cmd_name_rev.py .py 10 symbols added, 3 symbols removed, 12 symbols modified
test_format_error_goes_to_stderr method method test_format_error_goes_to_stderr L592–598
test_no_args_error_goes_to_stderr method method test_no_args_error_goes_to_stderr L600–604
test_no_traceback_on_bad_format method method test_no_traceback_on_bad_format L606–611
+ TestRegisterFlags class class TestRegisterFlags L51–69
+ _parse method method _parse L52–57
+ test_default_json_out_is_false method method test_default_json_out_is_false L59–61
+ test_j_shorthand_sets_json_out method method test_j_shorthand_sets_json_out L67–69
+ test_json_flag_sets_json_out method method test_json_flag_sets_json_out L63–65
+ test_no_args_exits_nonzero method method test_no_args_exits_nonzero L637–641
+ test_no_traceback_on_unknown_flag method method test_no_traceback_on_unknown_flag L643–648
+ test_unknown_flag_exits_nonzero method method test_unknown_flag_exits_nonzero L629–635
+ _nr_text function function _nr_text L158–165
+ argparse import import argparse L24–24
~ _nr
← 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:bd8ec25260aba5ee4d21d6a40d052dbedce1b4f219c7ee1017a61240defa61bb --body "your comment"