1515# specific language governing permissions and limitations
1616# under the License.
1717
18- import warnings
1918from typing import TYPE_CHECKING , Optional , Sequence , Union
2019
2120from airflow .models import BaseOperator
@@ -38,8 +37,6 @@ class GoogleDriveToGCSOperator(BaseOperator):
3837 file should be written to
3938 :param object_name: The Google Cloud Storage object name for the object created by the operator.
4039 For example: ``path/to/my/file/file.txt``.
41- :param destination_bucket: Same as bucket_name, but for backward compatibly
42- :param destination_object: Same as object_name, but for backward compatibly
4340 :param folder_id: The folder id of the folder in which the Google Drive file resides
4441 :param file_name: The name of the file residing in Google Drive
4542 :param drive_id: Optional. The id of the shared Google Drive in which the file resides.
@@ -69,10 +66,8 @@ class GoogleDriveToGCSOperator(BaseOperator):
6966 def __init__ (
7067 self ,
7168 * ,
72- bucket_name : Optional [ str ] = None ,
69+ bucket_name : str ,
7370 object_name : Optional [str ] = None ,
74- destination_bucket : Optional [str ] = None , # deprecated
75- destination_object : Optional [str ] = None , # deprecated
7671 file_name : str ,
7772 folder_id : str ,
7873 drive_id : Optional [str ] = None ,
@@ -82,23 +77,8 @@ def __init__(
8277 ** kwargs ,
8378 ) -> None :
8479 super ().__init__ (** kwargs )
85- if destination_bucket :
86- warnings .warn (
87- "`destination_bucket` is deprecated please use `bucket_name`" ,
88- DeprecationWarning ,
89- stacklevel = 2 ,
90- )
91- actual_bucket = destination_bucket or bucket_name
92- if actual_bucket is None :
93- raise RuntimeError ("One of the destination_bucket or bucket_name must be set" )
94- self .bucket_name : str = actual_bucket
95- self .object_name = destination_object or object_name
96- if destination_object :
97- warnings .warn (
98- "`destination_object` is deprecated please use `object_name`" ,
99- DeprecationWarning ,
100- stacklevel = 2 ,
101- )
80+ self .bucket_name = bucket_name
81+ self .object_name = object_name
10282 self .folder_id = folder_id
10383 self .drive_id = drive_id
10484 self .file_name = file_name
0 commit comments