[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:
Danglewood
2026-09-27 12:02:41 -07:00
committed by GitHub
parent 916a52ce41
commit 1b4a2cc8bc
8 changed files with 257 additions and 206 deletions

View File

@@ -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")