Skip to content

Commit

Permalink
[AIRFLOW-4204] Update super() calls (#7248)
Browse files Browse the repository at this point in the history
  • Loading branch information
xinbinhuang authored and turbaszek committed Jan 24, 2020
1 parent 23c5a58 commit eee34ee
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion airflow/contrib/operators/dynamodb_to_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __init__(self,
s3_key_prefix: str = '',
process_func: Callable[[Dict[str, Any]], bytes] = _convert_item_to_json_bytes,
*args, **kwargs):
super(DynamoDBToS3Operator, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.file_size = file_size
self.process_func = process_func
self.dynamodb_table_name = dynamodb_table_name
Expand Down
2 changes: 1 addition & 1 deletion airflow/gcp/hooks/discovery_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(
gcp_conn_id='google_cloud_default',
delegate_to: Optional[str] = None
) -> None:
super(GoogleDiscoveryApiHook, self).__init__(gcp_conn_id=gcp_conn_id, delegate_to=delegate_to)
super().__init__(gcp_conn_id=gcp_conn_id, delegate_to=delegate_to)
self.api_service_name = api_service_name
self.api_version = api_version

Expand Down
2 changes: 1 addition & 1 deletion airflow/gcp/sensors/gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def poke(self, context):

def execute(self, context):
"""Overridden to allow matches to be passed"""
super(GCSObjectsWtihPrefixExistenceSensor, self).execute(context)
super().execute(context)
return self._matches


Expand Down
2 changes: 1 addition & 1 deletion airflow/operators/bigquery_to_mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(self, # pylint: disable=too-many-arguments
location: Optional[str] = None,
*args,
**kwargs) -> None:
super(BigQueryToMySqlOperator, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.selected_fields = selected_fields
self.gcp_conn_id = gcp_conn_id
self.mysql_conn_id = mysql_conn_id
Expand Down
2 changes: 1 addition & 1 deletion airflow/operators/google_api_to_s3_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def __init__(
aws_conn_id='aws_default',
**kwargs
):
super(GoogleApiToS3Transfer, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.google_api_service_name = google_api_service_name
self.google_api_service_version = google_api_service_version
self.google_api_endpoint_path = google_api_endpoint_path
Expand Down
2 changes: 1 addition & 1 deletion airflow/operators/sql_to_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(self, # pylint: disable=too-many-arguments
delegate_to=None,
*args,
**kwargs):
super(BaseSQLToGCSOperator, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)

if google_cloud_storage_conn_id:
warnings.warn(
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/mysql/hooks/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def get_conn(self):

def get_uri(self):
conn = self.get_connection(getattr(self, self.conn_name_attr))
uri = super(MySqlHook, self).get_uri()
uri = super().get_uri()
if conn.extra_dejson.get('charset', False):
charset = conn.extra_dejson["charset"]
return "{uri}?charset={charset}".format(uri=uri, charset=charset)
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/snowflake/operators/s3_to_snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self,
autocommit=True,
snowflake_conn_id='snowflake_default',
*args, **kwargs):
super(S3ToSnowflakeTransfer, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.s3_keys = s3_keys
self.table = table
self.stage = stage
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/snowflake/operators/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(
self, sql, snowflake_conn_id='snowflake_default', parameters=None,
autocommit=True, warehouse=None, database=None, role=None,
schema=None, *args, **kwargs):
super(SnowflakeOperator, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
self.snowflake_conn_id = snowflake_conn_id
self.sql = sql
self.autocommit = autocommit
Expand Down

0 comments on commit eee34ee

Please sign in to comment.