diff --git a/snakebids/bidsapp/run.py b/snakebids/bidsapp/run.py index 7b8179aa..894da89f 100644 --- a/snakebids/bidsapp/run.py +++ b/snakebids/bidsapp/run.py @@ -168,10 +168,7 @@ def build_parser(self): if not self._parser_built: self.pm.hook.initialize_config(config=self.config) for group in self.parser._action_groups: # noqa: SLF001 - if group.title is not None and group.title not in { - "positional arguments", - "optional arguments", - }: + if group.title is not None: self.argument_groups[group.title] = group self.pm.hook.add_cli_arguments( parser=self.parser, diff --git a/snakebids/tests/test_bidsapp.py b/snakebids/tests/test_bidsapp.py index a22307ac..6e2d0e1c 100644 --- a/snakebids/tests/test_bidsapp.py +++ b/snakebids/tests/test_bidsapp.py @@ -31,7 +31,7 @@ def add_cli_arguments( assert len(config) == 1 assert config["initialized"] assert len(parser._actions) == 1 - assert not argument_groups + assert len(argument_groups) == 2 config["added_args"] = True parser.add_argument("arg_one") parser.add_argument("--arg-two") @@ -192,5 +192,5 @@ def test_argument_groups_visible_to_add_arg_hook(self): app.parser.add_argument_group("foo") app.run() assert self.group_names - assert set(self.group_names) == {"foo", "new"} + assert set(self.group_names).issuperset({"foo", "new"}) assert app.argument_groups["new"].title == "new"