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:09 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master 6fb46d156 -> 032a3e6c8


[AIRFLOW-1590] fix unused module and variable

Closes #2652 from ProstoMaxim/master


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

Branch: refs/heads/master
Commit: 032a3e6c84b94021b998897de3549ff8417e533a
Parents: 6fb46d1
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:03 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/032a3e6c/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/032a3e6c/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/032a3e6c/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