From 7a5ea54ad5d9c3094cf7e0c253b156c84251138c Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Mon, 8 Jul 2024 14:36:27 -0400 Subject: [PATCH] Fix arg parsing --- pyperf/_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyperf/_runner.py b/pyperf/_runner.py index 9c9c8da7..a0516a02 100644 --- a/pyperf/_runner.py +++ b/pyperf/_runner.py @@ -244,7 +244,7 @@ def __init__(self, values=None, processes=None, hook_names = list(get_hook_names()) parser.add_argument( - '--hook', nargs="*", choices=hook_names, + '--hook', action="append", choices=hook_names, metavar=f"{', '.join(x for x in hook_names if not x.startswith('_'))}", help='Use the given pyperf hooks' )