Skip to content

Commit

Permalink
Fix type annotations in OracleOperator, JdbcOperator, SqliteOperator (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
shadrus committed Aug 6, 2021
1 parent faf9f73 commit bb52098
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions airflow/providers/jdbc/operators/jdbc.py
Expand Up @@ -15,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from typing import Iterable, Mapping, Optional, Union
from typing import Iterable, List, Mapping, Optional, Union

from airflow.models import BaseOperator
from airflow.providers.jdbc.hooks.jdbc import JdbcHook
Expand Down Expand Up @@ -51,7 +51,7 @@ class JdbcOperator(BaseOperator):
def __init__(
self,
*,
sql: str,
sql: Union[str, List[str]],
jdbc_conn_id: str = 'jdbc_default',
autocommit: bool = False,
parameters: Optional[Union[Mapping, Iterable]] = None,
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/oracle/operators/oracle.py
Expand Up @@ -15,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from typing import Iterable, Mapping, Optional, Union
from typing import Iterable, List, Mapping, Optional, Union

from airflow.models import BaseOperator
from airflow.providers.oracle.hooks.oracle import OracleHook
Expand Down Expand Up @@ -47,7 +47,7 @@ class OracleOperator(BaseOperator):
def __init__(
self,
*,
sql: str,
sql: Union[str, List[str]],
oracle_conn_id: str = 'oracle_default',
parameters: Optional[Union[Mapping, Iterable]] = None,
autocommit: bool = False,
Expand Down
4 changes: 2 additions & 2 deletions airflow/providers/sqlite/operators/sqlite.py
Expand Up @@ -15,7 +15,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from typing import Any, Iterable, Mapping, Optional, Union
from typing import Any, Iterable, List, Mapping, Optional, Union

from airflow.models import BaseOperator
from airflow.providers.sqlite.hooks.sqlite import SqliteHook
Expand Down Expand Up @@ -47,7 +47,7 @@ class SqliteOperator(BaseOperator):
def __init__(
self,
*,
sql: str,
sql: Union[str, List[str]],
sqlite_conn_id: str = 'sqlite_default',
parameters: Optional[Union[Mapping, Iterable]] = None,
**kwargs,
Expand Down

0 comments on commit bb52098

Please sign in to comment.