Files
OpenBB/cli/tests/test_controllers_base_controller.py
John Seong 86ec79d75f [BugFix] CLI parser splits comma-separated flag values into separate args (#7420)
* fix: preserve comma-separated values for flagged CLI arguments

The CLI argument parser was splitting all comma-separated values into
separate positional args before argparse could process them. This caused
multi-symbol queries like --symbol AAPL,MSFT,GOOGL to fail with
'args couldn't be interpreted' for all symbols after the first.

Flag values are now identified by checking whether the preceding token
is a known option string with nargs != 0, and their commas are preserved
so the provider receives the original comma-separated string.

* test: add coverage for comma-split fix in parse_known_args_and_warn

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
2026-03-22 20:00:08 +00:00

6.6 KiB