Skip to content

Commit

Permalink
Help on switches use the function's name
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Marceau authored and henryiii committed Apr 7, 2017
1 parent 41888ed commit b914039
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plumbum/cli/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def switchs(by_groups, show_groups):
swnames = ", ".join(("-" if len(n) == 1 else "--") + n for n in si.names
if n in self._switches_by_name and self._switches_by_name[n] == si)
if si.argtype:
if isinstance(si.argtype, type):
if hasattr(si.argtype, '__name__'):
typename = si.argtype.__name__
else:
typename = str(si.argtype)
Expand Down

0 comments on commit b914039

Please sign in to comment.