This is an automated email from the ASF dual-hosted git repository.

taragolis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 034039beb2 Remove `pylint` messages control instructions (#28555)
034039beb2 is described below

commit 034039beb2568850d29b34390d3dc1e2a91b8367
Author: Andrey Anshin <[email protected]>
AuthorDate: Sat Dec 24 03:01:56 2022 +0400

    Remove `pylint` messages control instructions (#28555)
---
 airflow/models/taskinstance.py                             | 2 +-
 airflow/providers/google/cloud/sensors/dataproc.py         | 1 -
 airflow/sensors/external_task.py                           | 2 +-
 airflow/utils/timeout.py                                   | 2 +-
 tests/providers/google/cloud/operators/test_cloud_build.py | 3 ---
 5 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/airflow/models/taskinstance.py b/airflow/models/taskinstance.py
index bdfa386a8e..ed0271374d 100644
--- a/airflow/models/taskinstance.py
+++ b/airflow/models/taskinstance.py
@@ -1540,7 +1540,7 @@ class TaskInstance(Base, LoggingMixin):
             for callback in callbacks:
                 try:
                     callback(context)
-                except Exception:  # pylint: disable=broad-except
+                except Exception:
                     callback_name = qualname(callback).split(".")[-1]
                     self.log.exception(
                         f"Error when executing {callback_name} callback"  # 
type: ignore[attr-defined]
diff --git a/airflow/providers/google/cloud/sensors/dataproc.py 
b/airflow/providers/google/cloud/sensors/dataproc.py
index 9df525c715..9d422a70f1 100644
--- a/airflow/providers/google/cloud/sensors/dataproc.py
+++ b/airflow/providers/google/cloud/sensors/dataproc.py
@@ -18,7 +18,6 @@
 """This module contains a Dataproc Job sensor."""
 from __future__ import annotations
 
-# pylint: disable=C0302
 import time
 from typing import TYPE_CHECKING, Sequence
 
diff --git a/airflow/sensors/external_task.py b/airflow/sensors/external_task.py
index e9573a0671..e1eec6d192 100644
--- a/airflow/sensors/external_task.py
+++ b/airflow/sensors/external_task.py
@@ -319,7 +319,7 @@ class ExternalTaskSensor(BaseSensorOperator):
     def _count_query(self, model, session, states, dttm_filter) -> Query:
         query = session.query(func.count()).filter(
             model.dag_id == self.external_dag_id,
-            model.state.in_(states),  # pylint: disable=no-member
+            model.state.in_(states),
             model.execution_date.in_(dttm_filter),
         )
         return query
diff --git a/airflow/utils/timeout.py b/airflow/utils/timeout.py
index 818cb2f691..06c4ba1de7 100644
--- a/airflow/utils/timeout.py
+++ b/airflow/utils/timeout.py
@@ -38,7 +38,7 @@ class TimeoutWindows(_timeout, LoggingMixin):
         self.seconds = seconds
         self.error_message = error_message + ", PID: " + str(os.getpid())
 
-    def handle_timeout(self, *args):  # pylint: disable=unused-argument
+    def handle_timeout(self, *args):
         """Logs information and raises AirflowTaskTimeout."""
         self.log.error("Process timed out, PID: %s", str(os.getpid()))
         raise AirflowTaskTimeout(self.error_message)
diff --git a/tests/providers/google/cloud/operators/test_cloud_build.py 
b/tests/providers/google/cloud/operators/test_cloud_build.py
index 0ec514267e..096de51ced 100644
--- a/tests/providers/google/cloud/operators/test_cloud_build.py
+++ b/tests/providers/google/cloud/operators/test_cloud_build.py
@@ -52,9 +52,6 @@ from airflow.providers.google.cloud.triggers.cloud_build 
import CloudBuildCreate
 from airflow.utils.timezone import datetime
 from airflow.utils.types import DagRunType
 
-# pylint: disable=R0904, C0111
-
-
 GCP_CONN_ID = "google_cloud_default"
 PROJECT_ID = "cloud-build-project"
 CLOUD_BUILD_HOOK_PATH = 
"airflow.providers.google.cloud.operators.cloud_build.CloudBuildHook"

Reply via email to