This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new bcf719b refactor: fixed type annotation for 'sql' param in
PostgresOperator (#17331)
bcf719b is described below
commit bcf719bfb49ca20eea66a2527307968ff290c929
Author: Yury Krylov <[email protected]>
AuthorDate: Mon Aug 2 23:32:59 2021 +0300
refactor: fixed type annotation for 'sql' param in PostgresOperator (#17331)
---
airflow/providers/postgres/operators/postgres.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/providers/postgres/operators/postgres.py
b/airflow/providers/postgres/operators/postgres.py
index e4ef23f..51733cd 100644
--- a/airflow/providers/postgres/operators/postgres.py
+++ b/airflow/providers/postgres/operators/postgres.py
@@ -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.postgres.hooks.postgres import PostgresHook
@@ -49,7 +49,7 @@ class PostgresOperator(BaseOperator):
def __init__(
self,
*,
- sql: str,
+ sql: Union[str, List[str]],
postgres_conn_id: str = 'postgres_default',
autocommit: bool = False,
parameters: Optional[Union[Mapping, Iterable]] = None,