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
@@ -1150,9 +1150,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',
|
||||
|
||||
+6
-2
@@ -1129,9 +1129,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',
|
||||
|
||||
+6
-2
@@ -3215,9 +3215,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',
|
||||
|
||||
+6
-2
@@ -1445,9 +1445,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',
|
||||
|
||||
+6
-2
@@ -1150,9 +1150,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',
|
||||
|
||||
+6
-2
@@ -1689,9 +1689,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',
|
||||
|
||||
+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',
|
||||
|
||||
+6
-2
@@ -1188,9 +1188,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',
|
||||
|
||||
+6
-2
@@ -1334,9 +1334,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