Repository: apache/airflow
File: providers/google/src/airflow/providers/google/cloud/transfers/calendar_to_gcs.py (Python)

Code before:

    def __init__(
        self,
        *,
        destination_bucket: str,
        api_version: str,
        calendar_id: str = "primary",
        i_cal_uid: str | None = None,
        max_attendees: int | None = None,
        max_results: int | None = None,
        order_by: str | None = None,
        private_extended_property: str | None = None,
        text_search_query: str | None = None,
        shared_extended_property: str | None = None,
        show_deleted: bool | None = None,
        show_hidden_invitation: bool | None = None,
        single_events: bool | None = None,
        sync_token: str | None = None,
        time_max: datetime | None = None,
        time_min: datetime | None = None,
        time_zone: str | None = None,
        updated_min: datetime | None = None,
        destination_path: str | None = None,
        gcp_conn_id: str = "google_cloud_default",
        impersonation_chain: str | Sequence[str] | None = None,
        unwrap_single: bool = True,
        **kwargs,
    ) -> None:
        super().__init__(**kwargs)
        self.gcp_conn_id = gcp_conn_id
        self.calendar_id = calendar_id
        self.api_version = api_version
        self.i_cal_uid = i_cal_uid
        self.max_attendees = max_attendees
        self.max_results = max_results
        self.order_by = order_by
        self.private_extended_property = private_extended_property
        self.text_search_query = text_search_query
        self.shared_extended_property = shared_extended_property
        self.show_deleted = show_deleted
        self.show_hidden_invitation = show_hidden_invitation
        self.single_events = single_events
        self.sync_token = sync_token
        self.time_max = time_max
        self.time_min = time_min
        self.time_zone = time_zone
        self.updated_min = updated_min
        self.destination_bucket = destination_bucket
        self.destination_path = destination_path
        self.impersonation_chain = impersonation_chain
        self.unwrap_single = unwrap_single

Review comment (suggestion):
In the future we plan to change the default to `False`, which will be a breaking change if you don't set it up explicitly.
For that reason, please let the value also accept `None` as well, and if it is `None` (meaning that it is unset) - set `unwrap_single` it to `True`  + raise a `FutureWarning` about the expected change.
If it is explicitly set (either `True` or `False`), there's no need to raise this warning.

Code after:
        "calendar_id",
        "destination_bucket",
        "destination_path",
        "impersonation_chain",
    ]

    def __init__(
        self,
        *,
        destination_bucket: str,
        api_version: str,
        calendar_id: str = "primary",
        i_cal_uid: str | None = None,
        max_attendees: int | None = None,
        max_results: int | None = None,
        order_by: str | None = None,
        private_extended_property: str | None = None,
        text_search_query: str | None = None,
        shared_extended_property: str | None = None,
        show_deleted: bool | None = None,
        show_hidden_invitation: bool | None = None,
        single_events: bool | None = None,
        sync_token: str | None = None,
        time_max: datetime | None = None,
        time_min: datetime | None = None,
        time_zone: str | None = None,
        updated_min: datetime | None = None,
        destination_path: str | None = None,
        gcp_conn_id: str = "google_cloud_default",
        impersonation_chain: str | Sequence[str] | None = None,
        unwrap_single: bool | None = None,
        return_gcs_uri: bool | None = None,
        **kwargs,
    ) -> None:
        super().__init__(**kwargs)
        self.gcp_conn_id = gcp_conn_id
        self.calendar_id = calendar_id
        self.api_version = api_version
        self.i_cal_uid = i_cal_uid
        self.max_attendees = max_attendees
        self.max_results = max_results
        self.order_by = order_by
        self.private_extended_property = private_extended_property
        self.text_search_query = text_search_query
        self.shared_extended_property = shared_extended_property
        self.show_deleted = show_deleted
        self.show_hidden_invitation = show_hidden_invitation
        self.single_events = single_events
        self.sync_token = sync_token
        self.time_max = time_max
        self.time_min = time_min