scripts: Renamed -p/--percent -> -%/--percent
How long has there been a whole key dedicated to percentages sitting on my keyboard!? There's some funky business with format strings in argparse, but this was already worked around for dbgbmap.py's -%/--usage flag.
This commit is contained in:
+6
-2
@@ -1690,9 +1690,13 @@ if __name__ == "__main__":
|
||||
parser.add_argument(
|
||||
'-d', '--diff',
|
||||
help="Specify CSV/JSON file to diff against.")
|
||||
# need a special Action here because this % causes problems
|
||||
class StoreTruePercent(argparse._StoreTrueAction):
|
||||
def format_usage(self):
|
||||
return '-%%'
|
||||
parser.add_argument(
|
||||
'-p', '--percent',
|
||||
action='store_true',
|
||||
'-%', '--percent',
|
||||
action=StoreTruePercent,
|
||||
help="Only show percentage change, not a full diff.")
|
||||
parser.add_argument(
|
||||
'-C', '--compare',
|
||||
|
||||
Reference in New Issue
Block a user