You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2021/06/22 19:24:58 UTC

[airflow] 20/47: Fixed pre-commits

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

potiuk pushed a commit to branch v2-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 7ba81729b127236a8c89bf390003b1df77b75f26
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Tue Jun 22 17:30:03 2021 +0200

    Fixed pre-commits
---
 airflow/cli/commands/connection_command.py |  2 +-
 airflow/www/views.py                       | 17 ++++-------------
 tests/jobs/test_local_task_job.py          |  2 +-
 3 files changed, 6 insertions(+), 15 deletions(-)

diff --git a/airflow/cli/commands/connection_command.py b/airflow/cli/commands/connection_command.py
index 8f60022..19912b6 100644
--- a/airflow/cli/commands/connection_command.py
+++ b/airflow/cli/commands/connection_command.py
@@ -30,7 +30,7 @@ from airflow.exceptions import AirflowNotFoundException
 from airflow.hooks.base import BaseHook
 from airflow.models import Connection
 from airflow.secrets.local_filesystem import load_connections_dict
-from airflow.utils import cli as cli_utils, yaml
+from airflow.utils import cli as cli_utils
 from airflow.utils.cli import suppress_logs_and_warning
 from airflow.utils.session import create_session
 
diff --git a/airflow/www/views.py b/airflow/www/views.py
index 55fd7de..8f4c23a 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -2280,16 +2280,10 @@ class Airflow(AirflowBaseView):  # noqa: D101  pylint: disable=too-many-public-m
             dag = dag.sub_dag(task_ids_or_regex=root, include_upstream=True, include_downstream=False)
         chart_height = wwwutils.get_chart_height(dag)
         chart = nvd3.lineChart(
-            name="lineChart",
-            x_is_date=True,
-            height=chart_height,
-            chart_attr=self.line_chart_attr
+            name="lineChart", x_is_date=True, height=chart_height, chart_attr=self.line_chart_attr
         )
         cum_chart = nvd3.lineChart(
-            name="cumLineChart",
-            x_is_date=True,
-            height=chart_height,
-            chart_attr=self.line_chart_attr
+            name="cumLineChart", x_is_date=True, height=chart_height, chart_attr=self.line_chart_attr
         )
 
         y_points = defaultdict(list)
@@ -2413,7 +2407,7 @@ class Airflow(AirflowBaseView):  # noqa: D101  pylint: disable=too-many-public-m
             x_is_date=True,
             y_axis_format='d',
             height=chart_height,
-            chart_attr=self.line_chart_attr
+            chart_attr=self.line_chart_attr,
         )
 
         for task in dag.tasks:
@@ -2484,10 +2478,7 @@ class Airflow(AirflowBaseView):  # noqa: D101  pylint: disable=too-many-public-m
 
         chart_height = wwwutils.get_chart_height(dag)
         chart = nvd3.lineChart(
-            name="lineChart",
-            x_is_date=True,
-            height=chart_height,
-            chart_attr=self.line_chart_attr
+            name="lineChart", x_is_date=True, height=chart_height, chart_attr=self.line_chart_attr
         )
         y_points = {}
         x_points = {}
diff --git a/tests/jobs/test_local_task_job.py b/tests/jobs/test_local_task_job.py
index 82d85f6..97645e4 100644
--- a/tests/jobs/test_local_task_job.py
+++ b/tests/jobs/test_local_task_job.py
@@ -33,7 +33,7 @@ from airflow import settings
 from airflow.exceptions import AirflowException, AirflowFailException
 from airflow.executors.sequential_executor import SequentialExecutor
 from airflow.jobs.local_task_job import LocalTaskJob
-from airflow.models.dag import DAG
+from airflow.models.dag import DAG, DagModel
 from airflow.models.dagbag import DagBag
 from airflow.models.taskinstance import TaskInstance
 from airflow.operators.dummy import DummyOperator