From 7a5dc58354dd01c8e2794a903c3613259ea7ca8c Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Tue, 4 Jul 2023 17:29:18 +0100 Subject: [PATCH] rename method --- openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/router.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/router.py b/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/router.py index 8cdbf80299c..fc9f5e4870b 100644 --- a/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/router.py +++ b/openbb_sdk/openbb_sdk_core/openbb_sdk_core/app/router.py @@ -169,7 +169,7 @@ class Router: kwargs["path"] = kwargs.get("path", f"/{func.__name__}") kwargs["endpoint"] = func kwargs["methods"] = kwargs.get("methods", ["GET"]) - kwargs["description"] = self.format_docstring(func) + kwargs["description"] = self.slice_docstring(func) api_router.add_api_route(**kwargs) @@ -227,7 +227,7 @@ class Router: return func @staticmethod - def format_docstring(func: Callable) -> str: + def slice_docstring(func: Callable) -> str: doc = func.__doc__ if doc: sliced = doc.split(" Parameters\n ----------")[0]