mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-26 19:22:23 +00:00
[Release] openbb-cli-v2.0.0 (#7692)
* fix missing test coverage in openbb_cli * fix conftest --------- Co-authored-by: deeleeramone <>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import argparse
|
||||
import ast
|
||||
import io
|
||||
import os
|
||||
import random
|
||||
import re
|
||||
@@ -205,12 +206,23 @@ Please feel free to check out our other products:
|
||||
def bootup():
|
||||
"""Bootup the cli."""
|
||||
if sys.platform == "win32": # pragma: no cover
|
||||
os.system("") # noqa: S605, S607
|
||||
import ctypes
|
||||
|
||||
std_output_handle = -11
|
||||
enable_virtual_terminal_processing = 0x0004
|
||||
kernel32 = ctypes.windll.kernel32
|
||||
handle = kernel32.GetStdHandle(std_output_handle)
|
||||
mode = ctypes.c_ulong()
|
||||
if kernel32.GetConsoleMode(handle, ctypes.byref(mode)):
|
||||
kernel32.SetConsoleMode(
|
||||
handle, mode.value | enable_virtual_terminal_processing
|
||||
)
|
||||
|
||||
try:
|
||||
if os.name == "nt": # pragma: no cover
|
||||
sys.stdin.reconfigure(encoding="utf-8")
|
||||
sys.stdout.reconfigure(encoding="utf-8")
|
||||
for stream in (sys.stdin, sys.stdout):
|
||||
if isinstance(stream, io.TextIOWrapper):
|
||||
stream.reconfigure(encoding="utf-8")
|
||||
except Exception as e: # pragma: no cover
|
||||
session.console.print(e, "\n")
|
||||
|
||||
|
||||
@@ -202,8 +202,6 @@ def _build_operation_entry(
|
||||
providers_set = set(providers) if providers else None
|
||||
params: list[dict[str, Any]] = []
|
||||
for resolved in operation_parameters(spec, path_item or {}, op):
|
||||
if not resolved:
|
||||
continue
|
||||
normalized = _normalize_parameter(resolved, providers_set)
|
||||
if normalized is not None:
|
||||
params.append(normalized)
|
||||
|
||||
Reference in New Issue
Block a user