Skip to content

Commit

Permalink
hotfix / Allow routine args inside lists (#5353)
Browse files Browse the repository at this point in the history
* allow routine args inside lists

* add `-f` to `call_exe` parser
  • Loading branch information
tehcoderer committed Aug 21, 2023
1 parent 3fcb64d commit 144c59c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openbb_terminal/routine_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions openbb_terminal/terminal_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,7 @@ def call_exe(self, other_args: List[str]):
)
parser.add_argument(
"--file",
"-f",
help="The path or .openbb file to run.",
dest="file",
required="-h" not in other_args
Expand Down

0 comments on commit 144c59c

Please sign in to comment.