airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject incubator-airflow git commit: [AIRFLOW-1590] fix unused module and variable
Date Tue, 03 Oct 2017 09:13:22 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/v1-9-test 97666b566 -> 31946e024


[AIRFLOW-1590] fix unused module and variable

Closes #2652 from ProstoMaxim/master

(cherry picked from commit 032a3e6c84b94021b998897de3549ff8417e533a)
Signed-off-by: Bolke de Bruin <bolke@xs4all.nl>


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/31946e02
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/31946e02
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/31946e02

Branch: refs/heads/v1-9-test
Commit: 31946e024678dcb15b97ba53e35b9e37c57fb185
Parents: 97666b5
Author: Max Murashov <m.murashov@rambler-co.ru>
Authored: Tue Oct 3 11:13:03 2017 +0200
Committer: Bolke de Bruin <bolke@xs4all.nl>
Committed: Tue Oct 3 11:13:16 2017 +0200

----------------------------------------------------------------------
 airflow/jobs.py              | 6 +++---
 airflow/operators/sensors.py | 3 +--
 airflow/utils/dates.py       | 4 ++--
 3 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/31946e02/airflow/jobs.py
----------------------------------------------------------------------
diff --git a/airflow/jobs.py b/airflow/jobs.py
index d697f2d..8ca81dc 100644
--- a/airflow/jobs.py
+++ b/airflow/jobs.py
@@ -221,7 +221,7 @@ class BaseJob(Base, LoggingMixin):
         :param filter_by_dag_run: the dag_run we want to process, None if all
         :type filter_by_dag_run: models.DagRun
         :return: the TIs reset (in expired SQLAlchemy state)
-        :rtype: List(TaskInsance)
+        :rtype: List(TaskInstance)
         """
         queued_tis = self.executor.queued_tasks
         # also consider running as the state might not have changed in the db yet
@@ -1042,7 +1042,7 @@ class SchedulerJob(BaseJob):
 
         # Get all the queued task instances from associated with scheduled
         # DagRuns which are not backfilled, in the given states,
-        # and the dag is not pasued
+        # and the dag is not paused
         TI = models.TaskInstance
         DR = models.DagRun
         DM = models.DagModel
@@ -1610,7 +1610,7 @@ class SchedulerJob(BaseJob):
                 self._execute_task_instances(simple_dag_bag,
                                              (State.SCHEDULED,))
 
-            # Call hearbeats
+            # Call heartbeats
             self.log.info("Heartbeating the executor")
             self.executor.heartbeat()
 

http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/31946e02/airflow/operators/sensors.py
----------------------------------------------------------------------
diff --git a/airflow/operators/sensors.py b/airflow/operators/sensors.py
index 47a4289..14daa6d 100644
--- a/airflow/operators/sensors.py
+++ b/airflow/operators/sensors.py
@@ -117,7 +117,6 @@ class SqlSensor(BaseSensorOperator):
                 return False
             else:
                 return True
-            print(records[0][0])
 
 
 class MetastorePartitionSensor(SqlSensor):
@@ -430,7 +429,7 @@ class HdfsSensor(BaseSensorOperator):
         Will filter if instructed to do so the result to remove matching criteria
 
         :param result: (list) of dicts returned by Snakebite ls
-        :param ignored_ext: (list) of ignored extentions
+        :param ignored_ext: (list) of ignored extensions
         :param ignore_copying: (bool) shall we ignore ?
         :return: (list) of dicts which were not removed
         """

http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/31946e02/airflow/utils/dates.py
----------------------------------------------------------------------
diff --git a/airflow/utils/dates.py b/airflow/utils/dates.py
index 6ce6524..43b87f4 100644
--- a/airflow/utils/dates.py
+++ b/airflow/utils/dates.py
@@ -17,7 +17,7 @@ from __future__ import division
 from __future__ import print_function
 from __future__ import unicode_literals
 
-from datetime import datetime, date, timedelta
+from datetime import datetime, timedelta
 from dateutil.relativedelta import relativedelta  # for doctest
 import six
 
@@ -83,7 +83,7 @@ def date_range(
             else:
                 start_date += delta
     else:
-        for i in range(abs(num)):
+        for _ in range(abs(num)):
             l.append(start_date)
             if delta_iscron:
                 if num > 0:


Mime
View raw message