Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type annotations in OracleOperator, JdbcOperator, SqliteOperator #17406

Merged
merged 3 commits into from
Aug 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions airflow/providers/jdbc/operators/jdbc.py
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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