|
15 | 15 | # KIND, either express or implied. See the License for the |
16 | 16 | # specific language governing permissions and limitations |
17 | 17 | # under the License. |
18 | | -from typing import Any, Dict, Iterable, List, Mapping, Optional, SupportsAbs, Union |
| 18 | +from typing import Any, Dict, Iterable, List, Mapping, Optional, Sequence, SupportsAbs, Union |
19 | 19 |
|
20 | 20 | from airflow.compat.functools import cached_property |
21 | 21 | from airflow.exceptions import AirflowException |
@@ -124,8 +124,8 @@ class SQLCheckOperator(BaseSQLOperator): |
124 | 124 | :type database: str |
125 | 125 | """ |
126 | 126 |
|
127 | | - template_fields: Iterable[str] = ("sql",) |
128 | | - template_ext: Iterable[str] = ( |
| 127 | + template_fields: Sequence[str] = ("sql",) |
| 128 | + template_ext: Sequence[str] = ( |
129 | 129 | ".hql", |
130 | 130 | ".sql", |
131 | 131 | ) |
@@ -178,14 +178,14 @@ class SQLValueCheckOperator(BaseSQLOperator): |
178 | 178 | """ |
179 | 179 |
|
180 | 180 | __mapper_args__ = {"polymorphic_identity": "SQLValueCheckOperator"} |
181 | | - template_fields = ( |
| 181 | + template_fields: Sequence[str] = ( |
182 | 182 | "sql", |
183 | 183 | "pass_value", |
184 | | - ) # type: Iterable[str] |
185 | | - template_ext = ( |
| 184 | + ) |
| 185 | + template_ext: Sequence[str] = ( |
186 | 186 | ".hql", |
187 | 187 | ".sql", |
188 | | - ) # type: Iterable[str] |
| 188 | + ) |
189 | 189 | ui_color = "#fff7e6" |
190 | 190 |
|
191 | 191 | def __init__( |
@@ -289,8 +289,8 @@ class SQLIntervalCheckOperator(BaseSQLOperator): |
289 | 289 | """ |
290 | 290 |
|
291 | 291 | __mapper_args__ = {"polymorphic_identity": "SQLIntervalCheckOperator"} |
292 | | - template_fields: Iterable[str] = ("sql1", "sql2") |
293 | | - template_ext: Iterable[str] = ( |
| 292 | + template_fields: Sequence[str] = ("sql1", "sql2") |
| 293 | + template_ext: Sequence[str] = ( |
294 | 294 | ".hql", |
295 | 295 | ".sql", |
296 | 296 | ) |
@@ -418,11 +418,11 @@ class SQLThresholdCheckOperator(BaseSQLOperator): |
418 | 418 | :type max_threshold: numeric or str |
419 | 419 | """ |
420 | 420 |
|
421 | | - template_fields = ("sql", "min_threshold", "max_threshold") |
422 | | - template_ext = ( |
| 421 | + template_fields: Sequence[str] = ("sql", "min_threshold", "max_threshold") |
| 422 | + template_ext: Sequence[str] = ( |
423 | 423 | ".hql", |
424 | 424 | ".sql", |
425 | | - ) # type: Iterable[str] |
| 425 | + ) |
426 | 426 |
|
427 | 427 | def __init__( |
428 | 428 | self, |
@@ -505,8 +505,8 @@ class BranchSQLOperator(BaseSQLOperator, SkipMixin): |
505 | 505 | :type parameters: mapping or iterable |
506 | 506 | """ |
507 | 507 |
|
508 | | - template_fields = ("sql",) |
509 | | - template_ext = (".sql",) |
| 508 | + template_fields: Sequence[str] = ("sql",) |
| 509 | + template_ext: Sequence[str] = (".sql",) |
510 | 510 | ui_color = "#a22034" |
511 | 511 | ui_fgcolor = "#F7F7F7" |
512 | 512 |
|
|
0 commit comments