diff --git a/scripts/code.py b/scripts/code.py index e977a4c6..7f2e1960 100755 --- a/scripts/code.py +++ b/scripts/code.py @@ -667,7 +667,11 @@ if __name__ == "__main__": '-D', '--define', dest='defines', action='append', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), help="Only include results where this field is this value.") class AppendSort(argparse.Action): def __call__(self, parser, namespace, value, option): diff --git a/scripts/cov.py b/scripts/cov.py index a29466d3..d6a2d10a 100755 --- a/scripts/cov.py +++ b/scripts/cov.py @@ -755,7 +755,11 @@ if __name__ == "__main__": '-D', '--define', dest='defines', action='append', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), help="Only include results where this field is this value.") class AppendSort(argparse.Action): def __call__(self, parser, namespace, value, option): diff --git a/scripts/data.py b/scripts/data.py index 1ed3c273..8d008e10 100755 --- a/scripts/data.py +++ b/scripts/data.py @@ -664,7 +664,11 @@ if __name__ == "__main__": '-D', '--define', dest='defines', action='append', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), help="Only include results where this field is this value.") class AppendSort(argparse.Action): def __call__(self, parser, namespace, value, option): diff --git a/scripts/perf.py b/scripts/perf.py index f5346dad..d229a605 100755 --- a/scripts/perf.py +++ b/scripts/perf.py @@ -1224,7 +1224,11 @@ if __name__ == "__main__": '-D', '--define', dest='defines', action='append', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), help="Only include results where this field is this value.") class AppendSort(argparse.Action): def __call__(self, parser, namespace, value, option): diff --git a/scripts/perfbd.py b/scripts/perfbd.py index d146b564..e5b6225b 100755 --- a/scripts/perfbd.py +++ b/scripts/perfbd.py @@ -1196,7 +1196,11 @@ if __name__ == "__main__": '-D', '--define', dest='defines', action='append', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), help="Only include results where this field is this value.") class AppendSort(argparse.Action): def __call__(self, parser, namespace, value, option): diff --git a/scripts/plot.py b/scripts/plot.py index 61d20a26..e9a0ad6e 100755 --- a/scripts/plot.py +++ b/scripts/plot.py @@ -1423,14 +1423,20 @@ if __name__ == "__main__": '-b', '--by', action='append', type=lambda x: ( - lambda k,v=None: (k, v.split(',') if v is not None else ()) + lambda k, vs=None: ( + k.strip(), + tuple(v.strip() for v in vs.split(',')) + if vs is not None else ()) )(*x.split('=', 1)), help="Group by this field. Can rename fields with new_name=old_name.") parser.add_argument( '-x', action='append', type=lambda x: ( - lambda k,v=None: (k, v.split(',') if v is not None else ()) + lambda k, vs=None: ( + k.strip(), + tuple(v.strip() for v in vs.split(',')) + if vs is not None else ()) )(*x.split('=', 1)), help="Field to use for the x-axis. Can rename fields with " "new_name=old_name.") @@ -1438,13 +1444,20 @@ if __name__ == "__main__": '-y', action='append', type=lambda x: ( - lambda k,v=None: (k, v.split(',') if v is not None else ()) + lambda k, vs=None: ( + k.strip(), + tuple(v.strip() for v in vs.split(',')) + if vs is not None else ()) )(*x.split('=', 1)), help="Field to use for the y-axis. Can rename fields with " "new_name=old_name.") parser.add_argument( '-D', '--define', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), action='append', help="Only include results where this field is this value. May include " "comma-separated options.") diff --git a/scripts/plotmpl.py b/scripts/plotmpl.py index 3d359825..1ba9174f 100755 --- a/scripts/plotmpl.py +++ b/scripts/plotmpl.py @@ -1103,14 +1103,20 @@ if __name__ == "__main__": '-b', '--by', action='append', type=lambda x: ( - lambda k,v=None: (k, v.split(',') if v is not None else ()) + lambda k, vs=None: ( + k.strip(), + tuple(v.strip() for v in vs.split(',')) + if vs is not None else ()) )(*x.split('=', 1)), help="Group by this field. Can rename fields with new_name=old_name.") parser.add_argument( '-x', action='append', type=lambda x: ( - lambda k,v=None: (k, v.split(',') if v is not None else ()) + lambda k, vs=None: ( + k.strip(), + tuple(v.strip() for v in vs.split(',')) + if vs is not None else ()) )(*x.split('=', 1)), help="Field to use for the x-axis. Can rename fields with " "new_name=old_name.") @@ -1118,13 +1124,20 @@ if __name__ == "__main__": '-y', action='append', type=lambda x: ( - lambda k,v=None: (k, v.split(',') if v is not None else ()) + lambda k, vs=None: ( + k.strip(), + tuple(v.strip() for v in vs.split(',')) + if vs is not None else ()) )(*x.split('=', 1)), help="Field to use for the y-axis. Can rename fields with " "new_name=old_name.") parser.add_argument( '-D', '--define', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), action='append', help="Only include results where this field is this value. May include " "comma-separated options.") diff --git a/scripts/stack.py b/scripts/stack.py index c14f1c3f..05b34df4 100755 --- a/scripts/stack.py +++ b/scripts/stack.py @@ -701,7 +701,11 @@ if __name__ == "__main__": '-D', '--define', dest='defines', action='append', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), help="Only include results where this field is this value.") class AppendSort(argparse.Action): def __call__(self, parser, namespace, value, option): diff --git a/scripts/structs.py b/scripts/structs.py index 4784e8c3..3a062289 100755 --- a/scripts/structs.py +++ b/scripts/structs.py @@ -620,7 +620,11 @@ if __name__ == "__main__": '-D', '--define', dest='defines', action='append', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), help="Only include results where this field is this value.") class AppendSort(argparse.Action): def __call__(self, parser, namespace, value, option): diff --git a/scripts/summary.py b/scripts/summary.py index b0dbedf4..d327781a 100755 --- a/scripts/summary.py +++ b/scripts/summary.py @@ -741,7 +741,10 @@ if __name__ == "__main__": '-b', '--by', action='append', type=lambda x: ( - lambda k,v=None: (k, v.split(',') if v is not None else ()) + lambda k, vs=None: ( + k.strip(), + tuple(v.strip() for v in vs.split(',')) + if vs is not None else ()) )(*x.split('=', 1)), help="Group by this field. Can rename fields with new_name=old_name.") parser.add_argument( @@ -749,14 +752,21 @@ if __name__ == "__main__": dest='fields', action='append', type=lambda x: ( - lambda k,v=None: (k, v.split(',') if v is not None else ()) + lambda k, vs=None: ( + k.strip(), + tuple(v.strip() for v in vs.split(',')) + if vs is not None else ()) )(*x.split('=', 1)), help="Show this field. Can rename fields with new_name=old_name.") parser.add_argument( '-D', '--define', dest='defines', action='append', - type=lambda x: (lambda k,v: (k, set(v.split(','))))(*x.split('=', 1)), + type=lambda x: ( + lambda k, vs: ( + k.strip(), + {v.strip() for v in vs.split(',')}) + )(*x.split('=', 1)), help="Only include results where this field is this value. May include " "comma-separated options.") class AppendSort(argparse.Action):