Skip to content

Commit

Permalink
Fix the Type Hints in RedshiftSQLOperator (#21885)
Browse files Browse the repository at this point in the history
`sql` accepts `Union[str, Iterable[str]],` not `Optional[Union[Dict, Iterable]],`
  • Loading branch information
kaxil authored Mar 1, 2022
1 parent d9017a0 commit 3218cca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/amazon/aws/operators/redshift_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# specific language governing permissions and limitations
# under the License.

from typing import TYPE_CHECKING, Dict, Iterable, Optional, Sequence, Union
from typing import TYPE_CHECKING, Iterable, Optional, Sequence, Union

from airflow.models import BaseOperator
from airflow.providers.amazon.aws.hooks.redshift_sql import RedshiftSQLHook
Expand Down Expand Up @@ -53,7 +53,7 @@ class RedshiftSQLOperator(BaseOperator):
def __init__(
self,
*,
sql: Optional[Union[Dict, Iterable]],
sql: Union[str, Iterable[str]],
redshift_conn_id: str = 'redshift_default',
parameters: Optional[dict] = None,
autocommit: bool = True,
Expand Down

0 comments on commit 3218cca

Please sign in to comment.