Replace _ by - in command flag names.

See #698.
This commit is contained in:
Florian Bruhin 2015-05-30 19:30:08 +02:00
parent e48e063c0f
commit b1dd649278

View File

@ -287,7 +287,7 @@ class Command:
A list of args.
"""
args = []
name = param.name.rstrip('_')
name = param.name.rstrip('_').replace('_', '-')
shortname = annotation_info.flag or name[0]
if len(shortname) != 1:
raise ValueError("Flag '{}' of parameter {} (command {}) must be "