style:fmt

This commit is contained in:
aries_ckt
2023-09-22 00:21:54 +08:00
parent 25ba20925f
commit ce3b2e6213
3 changed files with 5 additions and 15 deletions

View File

@@ -27,7 +27,7 @@ extensions = [
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinxcontrib.autodoc_pydantic",
'sphinxcontrib.autodoc_pydantic_base',
"sphinxcontrib.autodoc_pydantic_base",
"myst_nb",
"sphinx_copybutton",
"sphinx_panels",

View File

@@ -22,8 +22,8 @@ class SparkConnect(BaseConnect):
self,
file_path: str,
spark_session: Optional[SparkSession] = None,
engine_args: Optional[dict]= None,
**kwargs: Any
engine_args: Optional[dict] = None,
**kwargs: Any,
) -> None:
"""Initialize the Spark DataFrame from Datasource path
return: Spark DataFrame
@@ -109,15 +109,4 @@ class SparkConnect(BaseConnect):
return f"{self.table_name}{self.get_fields()}"
def get_table_comments(self, db_name):
session = self._db_sessions()
cursor = session.execute(
text(
f"""SELECT table, comment FROM system.tables WHERE database = '{db_name}'""".format(
db_name
)
)
)
table_comments = cursor.fetchall()
return [
(table_comment[0], table_comment[1]) for table_comment in table_comments
]
return ""

View File

@@ -19,6 +19,7 @@ async def model_params():
print(f"/worker/model/params")
try:
from pilot.model.cluster import WorkerManagerFactory
worker_manager = CFG.SYSTEM_APP.get_component(
ComponentType.WORKER_MANAGER_FACTORY, WorkerManagerFactory
).create()