mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-27 12:40:35 +00:00
reformat (#2742)
* reformat * add sortby as command in the regex filter Co-authored-by: john <john@erlandsen.tech> Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com> Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
This commit is contained in:
@@ -41,6 +41,7 @@ from openbb_terminal.helper_funcs import (
|
||||
EXPORT_ONLY_RAW_DATA_ALLOWED,
|
||||
print_rich_table,
|
||||
valid_date,
|
||||
parse_and_split_input,
|
||||
)
|
||||
from openbb_terminal.parent_classes import BaseController
|
||||
from openbb_terminal.rich_config import console, MenuText
|
||||
@@ -314,6 +315,22 @@ class EconomyController(BaseController):
|
||||
|
||||
self.completer = NestedCompleter.from_nested_dict(self.choices) # type: ignore
|
||||
|
||||
def parse_input(self, an_input: str) -> List:
|
||||
"""Parse controller input
|
||||
|
||||
Overrides the parent class function to handle github org/repo path convention.
|
||||
See `BaseController.parse_input()` for details.
|
||||
"""
|
||||
# Filtering out sorting parameters with forward slashes like P/E
|
||||
sort_filter = r"((\ -s |\ --sortby ).*?(P\/E|Fwd P\/E|P\/S|P\/B|P\/C|P\/FCF)*)"
|
||||
|
||||
custom_filters = [sort_filter]
|
||||
|
||||
commands = parse_and_split_input(
|
||||
an_input=an_input, custom_filters=custom_filters
|
||||
)
|
||||
return commands
|
||||
|
||||
def update_runtime_choices(self):
|
||||
if session and obbff.USE_PROMPT_TOOLKIT:
|
||||
if not self.fred_query.empty:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user