migration: preserve heaven trend fortune and heart slice
This commit is contained in:
@@ -9,11 +9,11 @@ from tushare_client import _sector_coverage_issue
|
||||
|
||||
|
||||
def load_method(name: str):
|
||||
source = Path("backend/application.py").read_text(encoding="utf-8")
|
||||
source = Path("backend/features/heaven/service.py").read_text(encoding="utf-8")
|
||||
tree = ast.parse(source)
|
||||
dashboard_service = next(
|
||||
node for node in tree.body
|
||||
if isinstance(node, ast.ClassDef) and node.name == "DashboardService"
|
||||
if isinstance(node, ast.ClassDef) and node.name == "HeavenServiceMixin"
|
||||
)
|
||||
method = next(
|
||||
node for node in dashboard_service.body
|
||||
|
||||
Reference in New Issue
Block a user