mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-12-01 13:44:16 +00:00
[V5] CLI 2.0 - Pluggable Backends, Non-TTY Default, HTTP Dispatcher, Spec Files + Codegen (#7433)
* stash some changes * add more robust testing * mypy * point PR at V5 * introduce spec file * codespell * test fix * fix workflow environment setup * fix workflow environment setup * fix workflow environment setup * add pyyaml to dependencies * split lint jobs * fix workflow environment setup * fix workflow environment setup * workflow env setup * workflow env setup * clean up code comments * add auth hook entrypoints * codespell * add codegen feature * codespell * move _unpack into dispatchers for consistency with codegen packages * surface nested models in the response * fix missing coverage in CI * socrata updates * test fix * detect plotly output * add --include and --exclude flags from generate-extension command * cap test matrix at python 3.14 * no useless comments * platform controller command description split * merge URL overloads from path params * exclude none and unset from model dump --------- Co-authored-by: deeleeramone <> Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -31,7 +31,7 @@ class SettingsController(BaseController):
|
||||
"field_name": k,
|
||||
}
|
||||
for k, v in sorted(
|
||||
session.settings.model_fields.items(),
|
||||
session.settings.__class__.model_fields.items(),
|
||||
key=lambda item: _get_extra(item[1]).get("command", ""),
|
||||
)
|
||||
if v.json_schema_extra
|
||||
@@ -102,7 +102,6 @@ class SettingsController(BaseController):
|
||||
if get_origin(annotation) is Literal:
|
||||
choices = annotation.__args__
|
||||
elif command == "console_style":
|
||||
# To have updated choices for console style
|
||||
choices = session.style.available_styles
|
||||
parser = argparse.ArgumentParser(
|
||||
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
|
||||
@@ -116,13 +115,12 @@ class SettingsController(BaseController):
|
||||
dest="value",
|
||||
action="store",
|
||||
required=False,
|
||||
type=type_, # type: ignore[arg-type]
|
||||
type=type_,
|
||||
choices=choices,
|
||||
)
|
||||
ns_parser, _ = self.parse_simple_args(parser, other_args)
|
||||
if ns_parser:
|
||||
if ns_parser.value:
|
||||
# Console style is applied immediately
|
||||
if command == "console_style":
|
||||
session.style.apply(ns_parser.value)
|
||||
session.settings.set_item(field_name, ns_parser.value)
|
||||
|
||||
Reference in New Issue
Block a user