You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/11/05 14:13:05 UTC
[airflow] branch main updated: Fix typos in warnings, docstrings,
exceptions (#19424)
This is an automated email from the ASF dual-hosted git repository.
kaxilnaik pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new f421409 Fix typos in warnings, docstrings, exceptions (#19424)
f421409 is described below
commit f421409b4d431a2055eb273e7bc355819c880bd9
Author: Mateusz Nojek <ma...@gmail.com>
AuthorDate: Fri Nov 5 15:11:56 2021 +0100
Fix typos in warnings, docstrings, exceptions (#19424)
---
airflow/models/dag.py | 2 +-
airflow/models/variable.py | 2 +-
airflow/providers/google/cloud/example_dags/example_s3_to_gcs.py | 3 ++-
airflow/providers/google/cloud/hooks/bigquery.py | 6 +++---
airflow/providers/google/cloud/operators/bigquery.py | 2 +-
breeze | 2 +-
docs/apache-airflow/howto/timetable.rst | 2 +-
7 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/airflow/models/dag.py b/airflow/models/dag.py
index dadd507..14986ac 100644
--- a/airflow/models/dag.py
+++ b/airflow/models/dag.py
@@ -2133,7 +2133,7 @@ class DAG(LoggingMixin):
:type task: task
"""
if not self.start_date and not task.start_date:
- raise AirflowException("Task is missing the start_date parameter")
+ raise AirflowException("DAG is missing the start_date parameter")
# if the task has no start date, assign it the same as the DAG
elif not task.start_date:
task.start_date = self.start_date
diff --git a/airflow/models/variable.py b/airflow/models/variable.py
index b724686..2d7a175 100644
--- a/airflow/models/variable.py
+++ b/airflow/models/variable.py
@@ -163,7 +163,7 @@ class Variable(Base, LoggingMixin):
:param key: Variable Key
:param value: Value to set for the Variable
- :param description: Value to set for the Variable
+ :param description: Description of the Variable
:param serialize_json: Serialize the value to a JSON string
:param session: SQL Alchemy Sessions
"""
diff --git a/airflow/providers/google/cloud/example_dags/example_s3_to_gcs.py b/airflow/providers/google/cloud/example_dags/example_s3_to_gcs.py
index 334aac5..3bcf734 100644
--- a/airflow/providers/google/cloud/example_dags/example_s3_to_gcs.py
+++ b/airflow/providers/google/cloud/example_dags/example_s3_to_gcs.py
@@ -28,6 +28,7 @@ from airflow.utils.dates import days_ago
GCP_PROJECT_ID = os.environ.get('GCP_PROJECT_ID', 'gcp-project-id')
S3BUCKET_NAME = os.environ.get('S3BUCKET_NAME', 'example-s3bucket-name')
GCS_BUCKET = os.environ.get('GCP_GCS_BUCKET', 'example-gcsbucket-name')
+GCS_BUCKET_URL = f"gs://{GCS_BUCKET}/"
UPLOAD_FILE = '/tmp/example-file.txt'
PREFIX = 'TESTS'
@@ -56,7 +57,7 @@ with models.DAG(
)
# [START howto_transfer_s3togcs_operator]
transfer_to_gcs = S3ToGCSOperator(
- task_id='s3_to_gcs_task', bucket=S3BUCKET_NAME, prefix=PREFIX, dest_gcs="gs://" + GCS_BUCKET
+ task_id='s3_to_gcs_task', bucket=S3BUCKET_NAME, prefix=PREFIX, dest_gcs=GCS_BUCKET_URL
)
# [END howto_transfer_s3togcs_operator]
diff --git a/airflow/providers/google/cloud/hooks/bigquery.py b/airflow/providers/google/cloud/hooks/bigquery.py
index 853457e..b32971d 100644
--- a/airflow/providers/google/cloud/hooks/bigquery.py
+++ b/airflow/providers/google/cloud/hooks/bigquery.py
@@ -622,7 +622,7 @@ class BigQueryHook(GoogleBaseHook, DbApiHook):
:param labels: A dictionary containing labels for the BiqQuery table.
:type labels: dict
:param description: A string containing the description for the BigQuery table.
- :type descriptin: str
+ :type description: str
:param encryption_configuration: [Optional] Custom encryption configuration (e.g., Cloud KMS keys).
**Example**: ::
@@ -632,8 +632,8 @@ class BigQueryHook(GoogleBaseHook, DbApiHook):
:type encryption_configuration: dict
"""
warnings.warn(
- "This method is deprecated. Please use `BigQueryHook.create_empty_table` method with"
- "pass passing the `table_resource` object. This gives more flexibility than this method.",
+ "This method is deprecated. Please use `BigQueryHook.create_empty_table` method with "
+ "passing the `table_resource` object. This gives more flexibility than this method.",
DeprecationWarning,
)
location = location or self.location
diff --git a/airflow/providers/google/cloud/operators/bigquery.py b/airflow/providers/google/cloud/operators/bigquery.py
index 4e8dba7..0a47a99 100644
--- a/airflow/providers/google/cloud/operators/bigquery.py
+++ b/airflow/providers/google/cloud/operators/bigquery.py
@@ -1142,7 +1142,7 @@ class BigQueryCreateExternalTableOperator(BaseOperator):
if not table_resource:
warnings.warn(
"Passing table parameters via keywords arguments will be deprecated. "
- "Please use provide table definition using `table_resource` parameter.",
+ "Please provide table definition using `table_resource` parameter.",
DeprecationWarning,
stacklevel=2,
)
diff --git a/breeze b/breeze
index a5e55f7..3b100db 100755
--- a/breeze
+++ b/breeze
@@ -1140,7 +1140,7 @@ function breeze::parse_arguments() {
shift 2
;;
-f | --forward-credentials)
- echo "Forwarding credentials. Be careful as your credentials ar available in the container!"
+ echo "Forwarding credentials. Be careful as your credentials are available in the container!"
echo
export FORWARD_CREDENTIALS="true"
shift
diff --git a/docs/apache-airflow/howto/timetable.rst b/docs/apache-airflow/howto/timetable.rst
index 773802c..5ad7cd0 100644
--- a/docs/apache-airflow/howto/timetable.rst
+++ b/docs/apache-airflow/howto/timetable.rst
@@ -254,7 +254,7 @@ Timetable Display in UI
-----------------------
By default, a custom timetable is displayed by their class name in the UI (e.g.
-the *Schedule* column in the "DAGs" table. It is possible to customize this
+the *Schedule* column in the "DAGs" table). It is possible to customize this
by overriding the ``summary`` property. This is especially useful for
parameterized timetables to include arguments provided in ``__init__``. For
our ``SometimeAfterWorkdayTimetable`` class, for example, we could have: