mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-02 15:32:04 +00:00
hotfix / Allow routine args inside lists (#5353)
* allow routine args inside lists * add `-f` to `call_exe` parser
This commit is contained in:
@@ -246,7 +246,7 @@ def parse_openbb_script(
|
||||
foreach_loop_found = True
|
||||
|
||||
# Regular expression pattern to match variables starting with $
|
||||
pattern = r"(?<!\$)(\$(\w+)(\[[^]]*\])?)(?![^\[]*\])"
|
||||
pattern = r"(?<!\$)(\$(\w+)(\[[^\]]*\])?)(?=(?:[^\]]*\]*))"
|
||||
|
||||
# Find all matches of the pattern in the line
|
||||
matches: Optional[List[Match[str]]] = re.findall(pattern, line)
|
||||
|
||||
@@ -632,6 +632,7 @@ class TerminalController(BaseController):
|
||||
)
|
||||
parser.add_argument(
|
||||
"--file",
|
||||
"-f",
|
||||
help="The path or .openbb file to run.",
|
||||
dest="file",
|
||||
required="-h" not in other_args
|
||||
|
||||
Reference in New Issue
Block a user