From bc5720822865ca02e2c580e0d2296daf914b45b1 Mon Sep 17 00:00:00 2001 From: Yashadatt Sawant Date: Fri, 13 Dec 2024 20:23:08 +0530 Subject: [PATCH] MyPy formatting --- smsdk/smsdk_entities/dashboard/dashboard.py | 8 ++++---- smsdk/smsdk_entities/dev_udf/dev_udf.py | 8 ++++---- smsdk/smsdk_entities/workspace/workspace.py | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/smsdk/smsdk_entities/dashboard/dashboard.py b/smsdk/smsdk_entities/dashboard/dashboard.py index aea116c..a83257a 100644 --- a/smsdk/smsdk_entities/dashboard/dashboard.py +++ b/smsdk/smsdk_entities/dashboard/dashboard.py @@ -1,4 +1,4 @@ -from typing import List +from typing import List, Any import json import importlib.resources as pkg_resources @@ -21,16 +21,16 @@ class DashboardData(SmsdkEntities, MaSession): mod_util = module_utility() log = log - def __init__(self, session, base_url) -> None: + def __init__(self, session, base_url: str) -> None: self.session = session self.base_url = base_url @mod_util - def get_utilities(self, *args, **kwargs) -> List: + def get_utilities(self, *args, **kwargs) -> List[Any]: return [*self.mod_util.all] @mod_util - def get_dashboards(self, dashboard_id) -> List: + def get_dashboards(self, dashboard_id: str) -> List[Any]: """ Utility function to get the panels data for dashboard """ diff --git a/smsdk/smsdk_entities/dev_udf/dev_udf.py b/smsdk/smsdk_entities/dev_udf/dev_udf.py index 7471ca8..0820e48 100644 --- a/smsdk/smsdk_entities/dev_udf/dev_udf.py +++ b/smsdk/smsdk_entities/dev_udf/dev_udf.py @@ -1,5 +1,5 @@ import time -from typing import List +from typing import List, Any from bs4 import BeautifulSoup import json import importlib.resources as pkg_resources @@ -27,11 +27,11 @@ def __init__(self, session, base_url) -> None: self.base_url = base_url @mod_util - def get_utilities(self, *args, **kwargs) -> List: + def get_utilities(self, *args, **kwargs) -> List[Any]: return [*self.mod_util.all] @mod_util - def get_list_of_udf(self) -> List: + def get_list_of_udf(self) -> List[Any]: """ Utility function to get list of UDF present in dev tool """ @@ -44,7 +44,7 @@ def get_list_of_udf(self) -> List: return list_of_udfs @mod_util - def get_udf_data(self, udf_name: str, params: dict) -> List: + def get_udf_data(self, udf_name: str, params: dict) -> List[Any]: """ Utility function to get the data after executing udf notebook """ diff --git a/smsdk/smsdk_entities/workspace/workspace.py b/smsdk/smsdk_entities/workspace/workspace.py index 6dd6f7d..03031ed 100644 --- a/smsdk/smsdk_entities/workspace/workspace.py +++ b/smsdk/smsdk_entities/workspace/workspace.py @@ -1,4 +1,4 @@ -from typing import List +from typing import List, Any import json import importlib.resources as pkg_resources from smsdk.tool_register import SmsdkEntities, smsdkentities @@ -25,14 +25,14 @@ def __init__(self, session, base_url) -> None: self.base_url = base_url @mod_util - def get_utilities(self, *args, **kwargs) -> List: + def get_utilities(self, *args, **kwargs) -> List[Any]: """ Get the list of registered utilites by name """ return [*self.mod_util.all] @mod_util - def get_cycles(self, *args, **kwargs) -> List: + def get_cycles(self, *args, **kwargs) -> List[Any]: """ Utility function to get the cycles from MA API