Skip to content

Commit

Permalink
Merge pull request #675 from sirosen/master
Browse files Browse the repository at this point in the history
Argument.make_metavar() defaults to type metavar
  • Loading branch information
JosiahDub authored May 15, 2018
2 parents cb29f88 + 16f720d commit 1782e21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion click/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1751,7 +1751,9 @@ def human_readable_name(self):
def make_metavar(self):
if self.metavar is not None:
return self.metavar
var = self.name.upper()
var = self.type.get_metavar(self)
if not var:
var = self.name.upper()
if not self.required:
var = '[%s]' % var
if self.nargs != 1:
Expand Down

0 comments on commit 1782e21

Please sign in to comment.