mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-02 15:32:04 +00:00
rename __commands__ to __extensions__
This commit is contained in:
@@ -10,7 +10,7 @@ from openbb_core.app.static.coverage import Coverage
|
||||
def create_app():
|
||||
try:
|
||||
# pylint: disable=import-outside-toplevel
|
||||
from openbb_core.app.static.package.__commands__ import Commands
|
||||
from openbb_core.app.static.package.__extensions__ import Extensions
|
||||
except ImportError as e:
|
||||
raise Exception(
|
||||
"If you are seeing this exception, you should probably be doing: "
|
||||
@@ -18,7 +18,7 @@ def create_app():
|
||||
"PackageBuilder.build()"
|
||||
) from e
|
||||
|
||||
class App(Commands):
|
||||
class App(Extensions):
|
||||
"""Here you can access all the basic utility menus and extensions.
|
||||
|
||||
Basic utility menus:
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
from openbb_core.app.static.container import Container
|
||||
|
||||
|
||||
class Commands(Container):
|
||||
class Extensions(Container):
|
||||
@property
|
||||
def crypto(self): # route = "/crypto"
|
||||
from openbb_core.app.static.package import crypto
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"crypto_load": "/crypto/load",
|
||||
"__commands__": "",
|
||||
"__extensions__": "",
|
||||
"crypto": "/crypto",
|
||||
"economy_corecpi": "/economy/corecpi",
|
||||
"economy": "/economy",
|
||||
|
||||
@@ -660,13 +660,13 @@ class PathHandler:
|
||||
@classmethod
|
||||
def build_module_name(cls, path: str) -> str:
|
||||
if path == "":
|
||||
return "__commands__"
|
||||
return "__extensions__"
|
||||
return cls.clean_path(path=path)
|
||||
|
||||
@classmethod
|
||||
def build_module_class(cls, path: str) -> str:
|
||||
if path == "":
|
||||
return "Commands"
|
||||
return "Extensions"
|
||||
return f"CLASS_{cls.clean_path(path=path)}"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user