Skip to content

Commit

Permalink
Remove pylint messages control instructions (#28555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taragolis committed Dec 23, 2022
1 parent 81323e3 commit 034039b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion airflow/models/taskinstance.py
Expand Up @@ -1540,7 +1540,7 @@ def _run_finished_callback(
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]
Expand Down
1 change: 0 additions & 1 deletion airflow/providers/google/cloud/sensors/dataproc.py
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion airflow/sensors/external_task.py
Expand Up @@ -319,7 +319,7 @@ def get_count(self, dttm_filter, session, states) -> int:
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
Expand Down
2 changes: 1 addition & 1 deletion airflow/utils/timeout.py
Expand Up @@ -38,7 +38,7 @@ def __init__(self, seconds=1, error_message="Timeout"):
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)
Expand Down
3 changes: 0 additions & 3 deletions tests/providers/google/cloud/operators/test_cloud_build.py
Expand Up @@ -52,9 +52,6 @@
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"
Expand Down

0 comments on commit 034039b

Please sign in to comment.