Skip to content

Commit

Permalink
Fix mypy spark hooks (#20290)
Browse files Browse the repository at this point in the history
  • Loading branch information
subkanthi committed Dec 14, 2021
1 parent b20e6d3 commit 1a2a249
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions airflow/providers/apache/spark/hooks/spark_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# under the License.
#
import subprocess
from typing import TYPE_CHECKING, Any, List, Optional, Union
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union

from airflow.exceptions import AirflowException, AirflowNotFoundException
from airflow.hooks.base import BaseHook
Expand Down Expand Up @@ -88,9 +88,10 @@ def __init__(
conn: "Optional[Connection]" = self.get_connection(conn_id)
except AirflowNotFoundException:
conn = None
options = {}
options: Dict = {}
else:
options = conn.extra_dejson
if conn:
options = conn.extra_dejson

# Set arguments to values set in Connection if not explicitly provided.
if master is None:
Expand Down

0 comments on commit 1a2a249

Please sign in to comment.