mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-12 20:31:18 +00:00
rename vars
This commit is contained in:
@@ -15,7 +15,7 @@ register_matplotlib_converters()
|
||||
# pylint: disable=inconsistent-return-statements
|
||||
|
||||
|
||||
def load(l_args: List[str]):
|
||||
def load(other_args: List[str]):
|
||||
"""Load selected Cryptocurrency
|
||||
|
||||
Parameters
|
||||
@@ -51,11 +51,11 @@ def load(l_args: List[str]):
|
||||
)
|
||||
|
||||
try:
|
||||
if l_args:
|
||||
if "-" not in l_args[0]:
|
||||
l_args.insert(0, "-c")
|
||||
if other_args:
|
||||
if "-" not in other_args[0]:
|
||||
other_args.insert(0, "-c")
|
||||
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
ns_parser = parse_known_args_and_warn(parser, other_args)
|
||||
|
||||
if not ns_parser:
|
||||
return
|
||||
@@ -68,7 +68,7 @@ def load(l_args: List[str]):
|
||||
except KeyError:
|
||||
print(f"Could not find coin with the id: {ns_parser.coin}")
|
||||
print("")
|
||||
return [None, pd.DataFrame]
|
||||
return [None, pd.DataFrame()]
|
||||
|
||||
prices = cg.get_coin_market_chart_by_id(
|
||||
coin, vs_currency=ns_parser.vs, days=ns_parser.days
|
||||
@@ -92,7 +92,7 @@ def load(l_args: List[str]):
|
||||
return [None, pd.DataFrame()]
|
||||
|
||||
|
||||
def view(coin, prices, l_args: List[str]):
|
||||
def view(coin: str, prices: pd.DataFrame, other_args: List[str]):
|
||||
"""Plots loaded cryptocurrency
|
||||
|
||||
Parameters
|
||||
@@ -113,7 +113,7 @@ def view(coin, prices, l_args: List[str]):
|
||||
""",
|
||||
)
|
||||
try:
|
||||
ns_parser = parse_known_args_and_warn(parser, l_args)
|
||||
ns_parser = parse_known_args_and_warn(parser, other_args)
|
||||
|
||||
if not ns_parser:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user