diff --git a/providers/apache/drill/src/airflow/providers/apache/drill/hooks/drill.py b/providers/apache/drill/src/airflow/providers/apache/drill/hooks/drill.py index 52a5bf255a144..5da8c2044a288 100644 --- a/providers/apache/drill/src/airflow/providers/apache/drill/hooks/drill.py +++ b/providers/apache/drill/src/airflow/providers/apache/drill/hooks/drill.py @@ -18,7 +18,7 @@ from __future__ import annotations from collections.abc import Iterable -from typing import TYPE_CHECKING, Any +from typing import TYPE_CHECKING, Any, NoReturn from sqlalchemy import create_engine @@ -83,9 +83,7 @@ def get_uri(self) -> str: # The superclass DbApiHook's method implementation has a return type `None` and mypy fails saying # return type `NotImplementedError` is incompatible with it. Hence, we ignore the mypy error here. - def set_autocommit( # type: ignore[override] - self, conn: Connection, autocommit: bool - ) -> NotImplementedError: + def set_autocommit(self, conn: Connection, autocommit: bool) -> NoReturn: raise NotImplementedError("There are no transactions in Drill.") # The superclass DbApiHook's method implementation has a return type `None` and mypy fails saying