Skip to content

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored and pankajastro committed Dec 8, 2023
1 parent 24d7be4 commit 70f2f35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions astronomer/providers/google/cloud/hooks/dataproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

from airflow.providers.google.common.consts import CLIENT_INFO
from airflow.providers.google.common.hooks.base_google import GoogleBaseHook
from google.api_core import gapic_v1
from google.api_core import gapic_v1, retry_async as retries
from google.api_core.client_options import ClientOptions
from google.api_core import retry_async as retries
from google.cloud.dataproc_v1 import (
ClusterControllerAsyncClient,
Job,
Expand All @@ -16,7 +15,7 @@
try:
OptionalRetry = Union[retries.AsyncRetry, gapic_v1.method._MethodDefault]
except AttributeError:
OptionalRetry = Union[retries.AsyncRetry, object] # type: ignore
OptionalRetry = Union[retries.AsyncRetry, object]

JobType = Union[Job, Any]

Expand Down
4 changes: 2 additions & 2 deletions astronomer/providers/snowflake/hooks/snowflake_sql_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def execute_query(
if e.response is None:
raise e
raise AirflowException(
f"Response: {e.response.content}, " f"Status Code: {e.response.status_code}"
f"Response: {e.response.content!r}, " f"Status Code: {e.response.status_code}"
) # pragma: no cover
json_response = response.json()
self.log.info("Snowflake SQL POST API response: %s", json_response)
Expand Down Expand Up @@ -208,7 +208,7 @@ def check_query_output(self, query_ids: list[str]) -> None:
if e.response is None:
raise e
raise AirflowException(
f"Response: {e.response.content}, Status Code: {e.response.status_code}"
f"Response: {e.response.content!r}, Status Code: {e.response.status_code}"
)

@staticmethod
Expand Down

0 comments on commit 70f2f35

Please sign in to comment.