This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-0-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-0-test by this push:
new 5498e39a766 [v3-0-test] Fix `_extract_template_fields ` mypy error
(#53855) (#54047)
5498e39a766 is described below
commit 5498e39a766481616f9c0196a86088fa44fd5487
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sat Aug 2 10:15:51 2025 +0200
[v3-0-test] Fix `_extract_template_fields ` mypy error (#53855) (#54047)
(cherry picked from commit e809161694b4bd99c265b08f6f701904599653f8)
Co-authored-by: Yeonguk Choo <[email protected]>
---
scripts/ci/pre_commit/validate_operators_init.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/ci/pre_commit/validate_operators_init.py
b/scripts/ci/pre_commit/validate_operators_init.py
index 0a5f58a9bf8..a8882545a86 100755
--- a/scripts/ci/pre_commit/validate_operators_init.py
+++ b/scripts/ci/pre_commit/validate_operators_init.py
@@ -60,14 +60,14 @@ def _extract_template_fields(class_node: ast.ClassDef) ->
list[str]:
and target.id == "template_fields"
and isinstance(class_item.value, ast.Tuple)
):
- return [elt.value for elt in class_item.value.elts if
isinstance(elt, ast.Constant)]
+ return [str(elt.value) for elt in class_item.value.elts if
isinstance(elt, ast.Constant)]
elif isinstance(class_item, ast.AnnAssign):
if (
isinstance(class_item.target, ast.Name)
and class_item.target.id == "template_fields"
and isinstance(class_item.value, ast.Tuple)
):
- return [elt.value for elt in class_item.value.elts if
isinstance(elt, ast.Constant)]
+ return [str(elt.value) for elt in class_item.value.elts if
isinstance(elt, ast.Constant)]
return []