Skip to content

Commit f421409

Browse files
authored
Fix typos in warnings, docstrings, exceptions (#19424)
1 parent 5cd8085 commit f421409

7 files changed

Lines changed: 10 additions & 9 deletions

File tree

airflow/models/dag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2133,7 +2133,7 @@ def add_task(self, task):
21332133
:type task: task
21342134
"""
21352135
if not self.start_date and not task.start_date:
2136-
raise AirflowException("Task is missing the start_date parameter")
2136+
raise AirflowException("DAG is missing the start_date parameter")
21372137
# if the task has no start date, assign it the same as the DAG
21382138
elif not task.start_date:
21392139
task.start_date = self.start_date

airflow/models/variable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def set(
163163
164164
:param key: Variable Key
165165
:param value: Value to set for the Variable
166-
:param description: Value to set for the Variable
166+
:param description: Description of the Variable
167167
:param serialize_json: Serialize the value to a JSON string
168168
:param session: SQL Alchemy Sessions
169169
"""

airflow/providers/google/cloud/example_dags/example_s3_to_gcs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
GCP_PROJECT_ID = os.environ.get('GCP_PROJECT_ID', 'gcp-project-id')
2929
S3BUCKET_NAME = os.environ.get('S3BUCKET_NAME', 'example-s3bucket-name')
3030
GCS_BUCKET = os.environ.get('GCP_GCS_BUCKET', 'example-gcsbucket-name')
31+
GCS_BUCKET_URL = f"gs://{GCS_BUCKET}/"
3132
UPLOAD_FILE = '/tmp/example-file.txt'
3233
PREFIX = 'TESTS'
3334

@@ -56,7 +57,7 @@ def upload_file():
5657
)
5758
# [START howto_transfer_s3togcs_operator]
5859
transfer_to_gcs = S3ToGCSOperator(
59-
task_id='s3_to_gcs_task', bucket=S3BUCKET_NAME, prefix=PREFIX, dest_gcs="gs://" + GCS_BUCKET
60+
task_id='s3_to_gcs_task', bucket=S3BUCKET_NAME, prefix=PREFIX, dest_gcs=GCS_BUCKET_URL
6061
)
6162
# [END howto_transfer_s3togcs_operator]
6263

airflow/providers/google/cloud/hooks/bigquery.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ def create_external_table(
622622
:param labels: A dictionary containing labels for the BiqQuery table.
623623
:type labels: dict
624624
:param description: A string containing the description for the BigQuery table.
625-
:type descriptin: str
625+
:type description: str
626626
:param encryption_configuration: [Optional] Custom encryption configuration (e.g., Cloud KMS keys).
627627
**Example**: ::
628628
@@ -632,8 +632,8 @@ def create_external_table(
632632
:type encryption_configuration: dict
633633
"""
634634
warnings.warn(
635-
"This method is deprecated. Please use `BigQueryHook.create_empty_table` method with"
636-
"pass passing the `table_resource` object. This gives more flexibility than this method.",
635+
"This method is deprecated. Please use `BigQueryHook.create_empty_table` method with "
636+
"passing the `table_resource` object. This gives more flexibility than this method.",
637637
DeprecationWarning,
638638
)
639639
location = location or self.location

airflow/providers/google/cloud/operators/bigquery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ def __init__(
11421142
if not table_resource:
11431143
warnings.warn(
11441144
"Passing table parameters via keywords arguments will be deprecated. "
1145-
"Please use provide table definition using `table_resource` parameter.",
1145+
"Please provide table definition using `table_resource` parameter.",
11461146
DeprecationWarning,
11471147
stacklevel=2,
11481148
)

breeze

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ function breeze::parse_arguments() {
11401140
shift 2
11411141
;;
11421142
-f | --forward-credentials)
1143-
echo "Forwarding credentials. Be careful as your credentials ar available in the container!"
1143+
echo "Forwarding credentials. Be careful as your credentials are available in the container!"
11441144
echo
11451145
export FORWARD_CREDENTIALS="true"
11461146
shift

docs/apache-airflow/howto/timetable.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Timetable Display in UI
254254
-----------------------
255255

256256
By default, a custom timetable is displayed by their class name in the UI (e.g.
257-
the *Schedule* column in the "DAGs" table. It is possible to customize this
257+
the *Schedule* column in the "DAGs" table). It is possible to customize this
258258
by overriding the ``summary`` property. This is especially useful for
259259
parameterized timetables to include arguments provided in ``__init__``. For
260260
our ``SometimeAfterWorkdayTimetable`` class, for example, we could have:

0 commit comments

Comments
 (0)