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 2022/05/16 19:54:58 UTC
[GitHub] [airflow] turbaszek commented on a diff in pull request #23695: Sql to gcs with exclude columns
turbaszek commented on code in PR #23695:
URL: https://github.com/apache/airflow/pull/23695#discussion_r874103703
##########
airflow/providers/google/cloud/transfers/sql_to_gcs.py:
##########
@@ -103,6 +104,7 @@ def __init__(
gcp_conn_id: str = 'google_cloud_default',
delegate_to: Optional[str] = None,
impersonation_chain: Optional[Union[str, Sequence[str]]] = None,
+ exclude_columns: List[str] = [],
Review Comment:
Please do not use `[]` as default argument. Use `None` and in constructor do `exclude_columns = exclude_columns or []` as we do in many places.
https://florimond.dev/en/posts/2018/08/python-mutable-defaults-are-the-source-of-all-evil/
--
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.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org