mik-laj commented on a change in pull request #5770: [AIRFLOW-5162] GCS Hook
Upload Method Improvement
URL: https://github.com/apache/airflow/pull/5770#discussion_r324422440
##########
File path: airflow/gcp/hooks/gcs.py
##########
@@ -185,45 +180,72 @@ def download(self, bucket_name, object_name,
filename=None):
else:
return blob.download_as_string()
- def upload(self, bucket_name, object_name, filename,
- mime_type='application/octet-stream', gzip=False):
+ def upload(self, bucket_name: str, object_name: str, filename: str = None,
+ data: Union[str, bytes] = None, mime_type: str = None, gzip:
bool = False,
+ encoding: str = 'utf-8') -> None:
"""
- Uploads a local file to Google Cloud Storage.
-
+ Uploads a local file or file data as string or bytes to Google Cloud
Storage.
Review comment:
New line is required after method description. Can you add it?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services