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

refactor: standardize --json/-j flag across conflicts, domain-info, for-each-ref, gc

Converts --format/--json store_const to --json/-j store_true (dest=json_out). Renames domain_info's schema field to domain_schema to avoid collision with the envelope's schema field. Removes _FORMAT_CHOICES from converted commands. Tests updated: TestRegisterFlags added, --format text/-format xml references cleaned up, JSON-expecting tests now explicitly pass --json.

sha256:1ee25921a7b549fbdb8ac8d60d5bcc982f505fd22d921c12a69679a84538ec79 sha
+26 ~42 −10 symbols
sha256:dd9c489ccada41e6e6dd80406e7065b5af72d8d6cb101157215b026a944f68d0 snapshot
+26
symbols added
~42
symbols modified
−10
symbols removed
0
dead code introduced
Semantic Changes 78 symbols
~ muse/cli/commands/conflicts.py .py 2 symbols modified
~ muse/cli/commands/domain_info.py .py 1 symbol removed, 3 symbols modified
_FORMAT_CHOICES variable variable _FORMAT_CHOICES L95–95
~ run
~ muse/cli/commands/for_each_ref.py .py 1 symbol removed, 2 symbols modified
_FORMAT_CHOICES variable variable _FORMAT_CHOICES L102–102
~ run
~ muse/cli/commands/gc.py .py 2 symbols modified
~ tests/test_cmd_conflicts.py .py 3 symbols added, 3 symbols removed, 1 symbol modified
test_default_fmt_is_text method method test_default_fmt_is_text L120–122
test_format_json_flag method method test_format_json_flag L128–130
test_json_flag_sets_fmt method method test_json_flag_sets_fmt L124–126
+ test_default_json_out_is_false method method test_default_json_out_is_false L120–122
+ test_j_shorthand_sets_json_out method method test_j_shorthand_sets_json_out L128–130
+ test_json_flag_sets_json_out method method test_json_flag_sets_json_out L124–126
~ tests/test_cmd_domain_info.py .py 9 symbols added, 3 symbols removed, 24 symbols modified
test_json_has_no_schema_key method method test_json_has_no_schema_key L162–169
test_format_error_goes_to_stderr method method test_format_error_goes_to_stderr L252–259
test_format_choices method method test_format_choices L62–65
+ test_json_has_no_domain_schema_key method method test_json_has_no_domain_schema_key L181–188
+ TestRegisterFlags class class TestRegisterFlags L63–82
+ _parse method method _parse L64–70
+ test_default_json_out_is_false method method test_default_json_out_is_false L72–74
+ test_j_shorthand_sets_json_out method method test_j_shorthand_sets_json_out L80–82
+ test_json_flag_sets_json_out method method test_json_flag_sets_json_out L76–78
+ test_unknown_flag_exits_nonzero method method test_unknown_flag_exits_nonzero L271–274
+ TYPE_CHECKING import import TYPE_CHECKING L30–30
+ argparse import import argparse L27–27
~ tests/test_cmd_for_each_ref.py .py 9 symbols added, 2 symbols removed, 8 symbols modified
test_error_format_goes_to_stderr method method test_error_format_goes_to_stderr L483–488
test_no_traceback_on_bad_format method method test_no_traceback_on_bad_format L503–507
+ TestRegisterFlags class class TestRegisterFlags L126–145
+ _parse method method _parse L127–133
+ test_default_json_out_is_false method method test_default_json_out_is_false L135–137
+ test_j_shorthand_sets_json_out method method test_j_shorthand_sets_json_out L143–145
+ test_json_flag_sets_json_out method method test_json_flag_sets_json_out L139–141
+ test_no_traceback_on_unknown_flag method method test_no_traceback_on_unknown_flag L533–537
+ test_unknown_flag_exits_nonzero method method test_unknown_flag_exits_nonzero L515–518
+ _fer_text function function _fer_text L117–118
+ argparse import import argparse L18–18
~ _fer
~ tests/test_cmd_gc.py .py 5 symbols added
+ TestRegisterFlags class class TestRegisterFlags L91–110
+ _parse method method _parse L92–98
+ test_default_json_out_is_false method method test_default_json_out_is_false L100–102
+ test_j_shorthand_sets_json_out method method test_j_shorthand_sets_json_out L108–110
+ test_json_flag_sets_json_out method method test_json_flag_sets_json_out L104–106
← 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:1ee25921a7b549fbdb8ac8d60d5bcc982f505fd22d921c12a69679a84538ec79 --body "your comment"