Skip to content

Commit

Permalink
update parse_plugin_spec return type & cli test
Browse files Browse the repository at this point in the history
* return type for parse_plugin_spec is not a tuple
* cli testing with `invalid` probe names needs `--skip_unknown` arg

Signed-off-by: Jeffrey Martin <[email protected]>
  • Loading branch information
jmartin-tech committed May 10, 2024
1 parent ea87654 commit 660fe95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion garak/_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def load_config(

def parse_plugin_spec(
spec: str, category: str, probe_tag_filter: str = ""
) -> List[str]:
) -> tuple[List[str], List[str]]:
from garak._plugins import enumerate_plugins

if spec is None or spec.lower() in ("", "auto", "none"):
Expand Down
1 change: 1 addition & 0 deletions tests/cli/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def test_run_all_active_detectors(capsys):
"-g",
"1",
"--narrow_output",
"--skip_unknown",
]
)
result = capsys.readouterr()
Expand Down

0 comments on commit 660fe95

Please sign in to comment.