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

Code before:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import json
from collections.abc import Sequence
from tempfile import NamedTemporaryFile
from typing import TYPE_CHECKING, Any, Union

from airflow.providers.google.cloud.hooks.gcs import GCSHook
from airflow.providers.google.suite.hooks.calendar import GoogleCalendarHook
from airflow.providers.google.version_compat import BaseOperator

if TYPE_CHECKING:
    from datetime import datetime


class GoogleCalendarToGCSOperator(BaseOperator):
    """
    Writes Google Calendar data into Google Cloud Storage.

    .. seealso::
        For more information on how to use this operator, take a look at the guide:
        :ref:`howto/operator:GoogleCalendarToGCSOperator`

    :param calendar_id: The Google Calendar ID to interact with.
    :param i_cal_uid: Optional. Specifies event ID in the ``iCalendar`` format in the response.
    :param max_attendees: Optional. If there are more than the specified number of attendees,
        only the participant is returned.
    :param max_results: Optional. Maximum number of events returned on one result page.
        Incomplete pages can be detected by a non-empty ``nextPageToken`` field in the response.
        By default the value is 250 events. The page size can never be larger than 2500 events
    :param order_by: Optional. Acceptable values are ``"startTime"`` or "updated"

Review comment (suggestion):
```suggestion
from typing import TYPE_CHECKING, Any
```

Code after:
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

import json
from collections.abc import Sequence
from tempfile import NamedTemporaryFile
from typing import TYPE_CHECKING, Any

from airflow.providers.google.cloud.hooks.gcs import GCSHook
from airflow.providers.google.suite.hooks.calendar import GoogleCalendarHook
from airflow.providers.google.version_compat import BaseOperator

if TYPE_CHECKING:
    from datetime import datetime


class GoogleCalendarToGCSOperator(BaseOperator):
    """
    Writes Google Calendar data into Google Cloud Storage.

    .. seealso::
        For more information on how to use this operator, take a look at the guide:
        :ref:`howto/operator:GoogleCalendarToGCSOperator`

    :param calendar_id: The Google Calendar ID to interact with.
    :param i_cal_uid: Optional. Specifies event ID in the ``iCalendar`` format in the response.
    :param max_attendees: Optional. If there are more than the specified number of attendees,
        only the participant is returned.
    :param max_results: Optional. Maximum number of events returned on one result page.
        Incomplete pages can be detected by a non-empty ``nextPageToken`` field in the response.
        By default the value is 250 events. The page size can never be larger than 2500 events
    :param order_by: Optional. Acceptable values are ``"startTime"`` or "updated"