Skip to content

Commit 7e650ad

Browse files
committed
Cleanup type ignores in mysql provider where possible
1 parent 65e11e3 commit 7e650ad

File tree

1 file changed

+5
-5
lines changed
  • providers/mysql/src/airflow/providers/mysql/hooks

1 file changed

+5
-5
lines changed

providers/mysql/src/airflow/providers/mysql/hooks/mysql.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def get_conn(self) -> MySQLConnectionTypes:
220220
"installed in case you see compilation error during installation."
221221
)
222222

223-
conn_config = self._get_conn_config_mysql_client(conn) # type: ignore[arg-type]
223+
conn_config = self._get_conn_config_mysql_client(conn)
224224
return MySQLdb.connect(**conn_config)
225225

226226
if client_name == "mysql-connector-python":
@@ -233,7 +233,7 @@ def get_conn(self) -> MySQLConnectionTypes:
233233
"'mysql-connector-python'. Warning! It might cause dependency conflicts."
234234
)
235235

236-
conn_config = self._get_conn_config_mysql_connector_python(conn) # type: ignore[arg-type]
236+
conn_config = self._get_conn_config_mysql_connector_python(conn)
237237
return mysql.connector.connect(**conn_config)
238238

239239
raise ValueError("Unknown MySQL client name provided!")
@@ -253,7 +253,7 @@ def bulk_load(self, table: str, tmp_file: str) -> None:
253253
(tmp_file,),
254254
)
255255
conn.commit()
256-
conn.close() # type: ignore[misc]
256+
conn.close()
257257

258258
def bulk_dump(self, table: str, tmp_file: str) -> None:
259259
"""Dump a database table into a tab-delimited file."""
@@ -270,7 +270,7 @@ def bulk_dump(self, table: str, tmp_file: str) -> None:
270270
(tmp_file,),
271271
)
272272
conn.commit()
273-
conn.close() # type: ignore[misc]
273+
conn.close()
274274

275275
@staticmethod
276276
def _serialize_cell(cell: object, conn: Connection | None = None) -> Any:
@@ -337,7 +337,7 @@ def bulk_load_custom(
337337

338338
cursor.close()
339339
conn.commit()
340-
conn.close() # type: ignore[misc]
340+
conn.close()
341341

342342
def get_openlineage_database_info(self, connection):
343343
"""Return MySQL specific information for OpenLineage."""

0 commit comments

Comments
 (0)