Skip to content

Commit

Permalink
cli: DictAction: set default metavar (iterative#10047)
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop authored Oct 20, 2023
1 parent 825c823 commit 4a0d56a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dvc/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@


class DictAction(argparse.Action):
def __init__(self, *args, **kwargs):
kwargs.setdefault("metavar", "<name>=<value>")
super().__init__(*args, **kwargs)

def __call__(self, parser, args, values, option_string=None): # noqa: ARG002
d = getattr(args, self.dest) or {}

Expand Down

0 comments on commit 4a0d56a

Please sign in to comment.