You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/11/13 10:04:49 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #12310: Add provide_file_and_upload to GCSHook

mik-laj commented on a change in pull request #12310:
URL: https://github.com/apache/airflow/pull/12310#discussion_r522849005



##########
File path: airflow/providers/google/cloud/hooks/gcs.py
##########
@@ -318,6 +318,38 @@ def provide_file(
             tmp_file.flush()
             yield tmp_file
 
+    @_fallback_object_url_to_object_name_and_bucket_name()
+    @contextmanager
+    def provide_file_and_upload(
+        self,
+        bucket_name: Optional[str] = None,
+        object_name: Optional[str] = None,
+        object_url: Optional[str] = None,  # pylint: disable=unused-argument

Review comment:
       This is needed for mypy and documentation. See: `_fallback_object_url_to_object_name_and_bucket_name` decorator.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org