Skip to content

Commit

Permalink
Fix spelling in Python files (#12230)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbampton committed Nov 10, 2020
1 parent 50fedfb commit 250436d
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
This DAG relies on the following environment variables:
* SOURCE_LOCATION_URI - Source location URI, usually on premisis SMB or NFS
* SOURCE_LOCATION_URI - Source location URI, usually on premises SMB or NFS
* DESTINATION_LOCATION_URI - Destination location URI, usually S3
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
This DAG relies on the following environment variables:
* SOURCE_LOCATION_URI - Source location URI, usually on premisis SMB or NFS
* SOURCE_LOCATION_URI - Source location URI, usually on premises SMB or NFS
* DESTINATION_LOCATION_URI - Destination location URI, usually S3
* CREATE_TASK_KWARGS - Passed to boto3.create_task(**kwargs)
* CREATE_SOURCE_LOCATION_KWARGS - Passed to boto3.create_location(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(
self.hook = hook
if self.hook and metastore_conn_id != 'metastore_default':
self.log.warning(
'A hook was passed but a non defaul metastore_conn_id=%s was used', metastore_conn_id
'A hook was passed but a non default metastore_conn_id=%s was used', metastore_conn_id
)

@staticmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@

# [START howto_operator_gcp_stackdriver_delete_alert_policy]
delete_alert_policy = StackdriverDeleteAlertOperator(
task_id='delete-alert-polciy',
task_id='delete-alert-policy',
name='test-alert',
)
# [END howto_operator_gcp_stackdriver_delete_alert_policy]
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/google/cloud/hooks/kms.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def decrypt(
"""
Decrypts a ciphertext message using Google Cloud KMS.
:param key_name: The Resource Name for the key to be used for decyption.
:param key_name: The Resource Name for the key to be used for decryption.
Of the form ``projects/*/locations/*/keyRings/*/cryptoKeys/**``
:type key_name: str
:param ciphertext: The message to be decrypted.
Expand Down
6 changes: 3 additions & 3 deletions airflow/providers/google/cloud/hooks/mlengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def create_model(
self._append_label(model)
try:
request = hook.projects().models().create(parent=project, body=model) # pylint: disable=no-member
respone = request.execute(num_retries=self.num_retries)
response = request.execute(num_retries=self.num_retries)
except HttpError as e:
if e.resp.status != 409:
raise e
Expand All @@ -441,9 +441,9 @@ def create_model(
or field_violation["description"] != "A model with the same name already exists."
):
raise e
respone = self.get_model(model_name=model['name'], project_id=project_id)
response = self.get_model(model_name=model['name'], project_id=project_id)

return respone
return response

@GoogleBaseHook.fallback_to_default_project_id
def get_model(
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/google/cloud/operators/speech_to_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def execute(self, context):
gcp_conn_id=self.gcp_conn_id,
impersonation_chain=self.impersonation_chain,
)
respones = hook.recognize_speech(
response = hook.recognize_speech(
config=self.config, audio=self.audio, retry=self.retry, timeout=self.timeout
)
return MessageToDict(respones)
return MessageToDict(response)
2 changes: 1 addition & 1 deletion airflow/providers/google/cloud/transfers/local_to_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def execute(self, context):
if os.path.basename(self.dst): # path to a file
if len(filepaths) > 1: # multiple file upload
raise ValueError(
"'dst' parameter references filepath. Please specifiy "
"'dst' parameter references filepath. Please specify "
"directory (with trailing backslash) to upload multiple "
"files. e.g. /path/to/directory/"
)
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/google/cloud/transfers/postgres_to_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ def convert_type(self, value, schema_type):
if isinstance(value, (datetime.datetime, datetime.date)):
return pendulum.parse(value.isoformat()).float_timestamp
if isinstance(value, datetime.time):
formated_time = time.strptime(str(value), "%H:%M:%S")
formatted_time = time.strptime(str(value), "%H:%M:%S")
return int(
datetime.timedelta(
hours=formated_time.tm_hour, minutes=formated_time.tm_min, seconds=formated_time.tm_sec
hours=formatted_time.tm_hour, minutes=formatted_time.tm_min, seconds=formatted_time.tm_sec
).total_seconds()
)
if isinstance(value, dict):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def decode(x):

@beam.ptransform_fn
def MakeSummary(pcoll, metric_fn, metric_keys): # pylint: disable=invalid-name
"""Summary PTransofrm used in Dataflow."""
"""Summary PTransform used in Dataflow."""
return (
pcoll
| "ApplyMetricFnPerInstance" >> beam.Map(metric_fn)
Expand Down
2 changes: 1 addition & 1 deletion airflow/providers/redis/operators/redis_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def execute(self, context: Dict) -> None:
"""
redis_hook = RedisHook(redis_conn_id=self.redis_conn_id)

self.log.info('Sending messsage %s to Redis on channel %s', self.message, self.channel)
self.log.info('Sending message %s to Redis on channel %s', self.message, self.channel)

result = redis_hook.get_conn().publish(channel=self.channel, message=self.message)

Expand Down
1 change: 0 additions & 1 deletion docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,6 @@ de
decomissioning
decrypt
decrypted
decyption
deepcopy
deidentify
del
Expand Down
2 changes: 1 addition & 1 deletion tests/providers/amazon/aws/sensors/test_sqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_poke_success(self):
)

@mock_sqs
def test_poke_no_messsage_failed(self):
def test_poke_no_message_failed(self):

self.sqs_hook.create_queue('test')
result = self.sensor.poke(self.mock_context)
Expand Down

0 comments on commit 250436d

Please sign in to comment.