airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject incubator-airflow git commit: [AIRFLOW-1841] change False to None in operator and hook
Date Thu, 23 Nov 2017 07:50:07 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master 2d5408935 -> cbd6e7041

[AIRFLOW-1841] change False to None in operator and hook

Documentation stated it's String type but in code
it was union of String and Bool.
Changed to to pure string by substituting False to
None since in operator and hook
code checks only for presence of value in
Make it more predictable by using simpler String

Closes #2807 from litdeviant/gcs-operator-hook


Branch: refs/heads/master
Commit: cbd6e70411b276d4ad6bb471b3760a3f7925a548
Parents: 2d54089
Author: Igors Vaitkus <>
Authored: Thu Nov 23 08:50:01 2017 +0100
Committer: Fokko Driesprong <>
Committed: Thu Nov 23 08:50:01 2017 +0100

 airflow/contrib/hooks/                  | 2 +-
 airflow/contrib/operators/ | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/airflow/contrib/hooks/ b/airflow/contrib/hooks/
index 24c247e..546e028 100644
--- a/airflow/contrib/hooks/
+++ b/airflow/contrib/hooks/
@@ -85,7 +85,7 @@ class GoogleCloudStorageHook(GoogleCloudBaseHook):
     # pylint:disable=redefined-builtin
-    def download(self, bucket, object, filename=False):
+    def download(self, bucket, object, filename=None):
         Get a file from Google Cloud Storage.
diff --git a/airflow/contrib/operators/ b/airflow/contrib/operators/
index 6f47833..e02656c 100644
--- a/airflow/contrib/operators/
+++ b/airflow/contrib/operators/
@@ -30,12 +30,12 @@ class GoogleCloudStorageDownloadOperator(BaseOperator):
     :type object: string
     :param filename: The file path on the local file system (where the
         operator is being executed) that the file should be downloaded to.
-        If false, the downloaded data will not be stored on the local file
+        If no filename passed, the downloaded data will not be stored on the local file
     :type filename: string
     :param store_to_xcom_key: If this param is set, the operator will push
         the contents of the downloaded file to XCom with the key set in this
-        parameter. If false, the downloaded data will not be pushed to XCom.
+        parameter. If not set, the downloaded data will not be pushed to XCom.
     :type store_to_xcom_key: string
     :param google_cloud_storage_conn_id: The connection ID to use when
         connecting to Google cloud storage.
@@ -51,8 +51,8 @@ class GoogleCloudStorageDownloadOperator(BaseOperator):
     def __init__(self,
-                 filename=False,
-                 store_to_xcom_key=False,
+                 filename=None,
+                 store_to_xcom_key=None,

View raw message