Skip to content

Commit

Permalink
style(microsoft): cast type for fixing mypy issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-W committed Oct 16, 2023
1 parent acce610 commit 35a7244
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from airflow import DAG
from airflow.models.xcom_arg import XComArg
from airflow.operators.python import PythonOperator

from astronomer.providers.microsoft.azure.operators.data_factory import (
AzureDataFactoryRunPipelineOperatorAsync,
)
Expand Down
4 changes: 2 additions & 2 deletions astronomer/providers/microsoft/azure/hooks/data_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, azure_data_factory_conn_id: str):
async def get_async_conn(self) -> DataFactoryManagementClient:
"""Get async connection and connect to azure data factory."""
if self._conn is not None:
return self._conn
return cast(DataFactoryManagementClient, self._conn)

conn = await sync_to_async(self.get_connection)(self.conn_id)
extras = conn.extra_dejson
Expand Down Expand Up @@ -147,7 +147,7 @@ async def get_adf_pipeline_run_status(
factory_name=factory_name,
resource_group_name=resource_group_name,
)
status: str = pipeline_run.status
status: str = cast(str, pipeline_run.status)
return status
except Exception as e:
raise AirflowException(e)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
AzureDataFactoryPipelineRunStatus,
)
from airflow.triggers.base import BaseTrigger, TriggerEvent

from astronomer.providers.microsoft.azure.hooks.data_factory import (
AzureDataFactoryHookAsync,
)
Expand Down

0 comments on commit 35a7244

Please sign in to comment.