Skip to content

Commit 9e2985c

Browse files
committed
fix(cli): update --license-sources to use extend action with nargs for improved argument handling
1 parent 9ed7291 commit 9e2985c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/scanoss/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -706,8 +706,9 @@ def setup_args() -> None: # noqa: PLR0912, PLR0915
706706
# See: https://github.com/python/cpython/commit/c4a2e8a2c5188c3288d57b80852e92c83f46f6f3
707707
for p in [p_inspect_raw_copyleft, p_inspect_legacy_copyleft]:
708708
p.add_argument(
709-
'--license-sources', '-ls',
710-
action='append',
709+
'-ls', '--license-sources',
710+
action='extend',
711+
nargs='+',
711712
choices=VALID_LICENSE_SOURCES,
712713
help=f'Specify which license sources to check for copyleft violations. Each license object in scan results '
713714
f'has a source field indicating its origin. Default: {", ".join(DEFAULT_COPYLEFT_LICENSE_SOURCES)}',

0 commit comments

Comments
 (0)