diff --git a/airflow/providers/influxdb/hooks/influxdb.py b/airflow/providers/influxdb/hooks/influxdb.py index b1b001730a47d..902b968a05790 100644 --- a/airflow/providers/influxdb/hooks/influxdb.py +++ b/airflow/providers/influxdb/hooks/influxdb.py @@ -58,7 +58,7 @@ def __init__(self, conn_id: str = default_conn_name, *args, **kwargs) -> None: super().__init__(*args, **kwargs) self.influxdb_conn_id = conn_id self.connection = kwargs.pop("connection", None) - self.client = None + self.client: InfluxDBClient | None = None self.extras: dict = {} self.uri = None @@ -78,7 +78,7 @@ def get_connection_form_widgets(cls) -> dict[str, Any]: ), } - def get_client(self, uri, kwargs): + def get_client(self, uri, kwargs) -> InfluxDBClient: return InfluxDBClient(url=uri, **kwargs) def get_uri(self, conn: Connection):