mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-05-22 14:36:47 +08:00
[BugFix] - Fix pylint possibly-used-before-assignment (#6484)
* fix: comply w/ possibly used before assignment * remove disabe from .pylintrc * remove reset test * remove reset test * fix: update missing keys message
This commit is contained in:
@@ -18,7 +18,6 @@ from typing import Any, Dict, List, Optional
|
||||
|
||||
import pandas as pd
|
||||
import requests
|
||||
from openbb import obb
|
||||
from openbb_cli.config import constants
|
||||
from openbb_cli.config.constants import (
|
||||
ASSETS_DIRECTORY,
|
||||
@@ -48,6 +47,8 @@ from prompt_toolkit.formatted_text import HTML
|
||||
from prompt_toolkit.styles import Style
|
||||
from pydantic import BaseModel
|
||||
|
||||
from openbb import obb
|
||||
|
||||
PLATFORM_ROUTERS = {
|
||||
d: "menu" if not isinstance(getattr(obb, d), BaseModel) else "command"
|
||||
for d in dir(obb)
|
||||
@@ -291,7 +292,7 @@ class CLIController(BaseController):
|
||||
: session.settings.N_TO_DISPLAY_OBBJECT_REGISTRY
|
||||
]:
|
||||
mt.add_raw(
|
||||
f"[yellow]OBB{key}[/yellow]: {value['command']}",
|
||||
f"[yellow]OBB{key}[/yellow]: {value['command']}", # type: ignore[index]
|
||||
left_spacing=True,
|
||||
)
|
||||
|
||||
@@ -769,7 +770,6 @@ def replace_dynamic(match: re.Match, special_arguments: Dict[str, str]) -> str:
|
||||
str
|
||||
The new string
|
||||
"""
|
||||
|
||||
cleaned = match[0].replace("{", "").replace("}", "").replace("$", "")
|
||||
key, default = cleaned.split("=")
|
||||
dict_value = special_arguments.get(key, default)
|
||||
@@ -939,7 +939,6 @@ def launch(
|
||||
debug: bool = False, dev: bool = False, queue: Optional[List[str]] = None
|
||||
) -> None:
|
||||
"""Launch CLI."""
|
||||
|
||||
if queue:
|
||||
main(debug, dev, queue, module="")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user