This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new 0ccea39af2b [v3-1-test] Extract prek hooks for Task-SDK (#57264)
(#57282)
0ccea39af2b is described below
commit 0ccea39af2b6a04a754bda86281691a0cbf5f608
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Oct 26 15:28:09 2025 +0100
[v3-1-test] Extract prek hooks for Task-SDK (#57264) (#57282)
(cherry picked from commit 91a355292dca971f2fe24784a4613c0cda317492)
Co-authored-by: Jens Scheffler <[email protected]>
---
.pre-commit-config.yaml | 21 --------------------
task-sdk/.pre-commit-config.yaml | 43 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+), 21 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 2493f414db0..d4bf93ebfb0 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -642,12 +642,6 @@ repos:
entry: ./scripts/ci/prek/check_base_operator_partial_arguments.py
pass_filenames: false
files: ^airflow-core/src/airflow/models/(?:base|mapped)operator\.py$
- - id: check-init-decorator-arguments
- name: Sync model __init__ and decorator arguments
- language: python
- entry: ./scripts/ci/prek/check_init_decorator_arguments.py
- pass_filenames: false
- files:
^task-sdk/src/airflow/sdk/definitions/dag\.py$|^task-sdk/src/airflow/sdk/definitions/decorators/task_group\.py$
- id: check-template-context-variable-in-sync
name: Sync template context variable refs
language: python
@@ -1158,21 +1152,6 @@ repos:
pass_filenames: false
files: ^airflow-core/.*\.py$
require_serial: true
- - id: mypy-task-sdk
- stages: ['pre-push']
- name: Run mypy for task-sdk
- language: python
- entry: ./scripts/ci/prek/mypy.py
- files: ^task-sdk/.*\.py$
- require_serial: true
- - id: mypy-task-sdk
- stages: ['manual']
- name: Run mypy for task-sdk (manual)
- language: python
- entry: ./scripts/ci/prek/mypy_folder.py task-sdk
- pass_filenames: false
- files: ^.*\.py$
- require_serial: true
- id: mypy-devel-common
stages: ['pre-push']
name: Run mypy for devel-common
diff --git a/task-sdk/.pre-commit-config.yaml b/task-sdk/.pre-commit-config.yaml
new file mode 100644
index 00000000000..cfa45831e9e
--- /dev/null
+++ b/task-sdk/.pre-commit-config.yaml
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+---
+default_stages: [pre-commit, pre-push]
+minimum_prek_version: '0.0.28'
+repos:
+ - repo: local
+ hooks:
+ - id: check-init-decorator-arguments
+ name: Sync model __init__ and decorator arguments
+ language: python
+ entry: ../scripts/ci/prek/check_init_decorator_arguments.py
+ pass_filenames: false
+ files:
^src/airflow/sdk/definitions/dag\.py$|^src/airflow/sdk/definitions/decorators/task_group\.py$
+ - id: mypy-task-sdk
+ stages: ['pre-push']
+ name: Run mypy for task-sdk
+ language: python
+ entry: ../scripts/ci/prek/mypy.py
+ files: ^.*\.py$
+ require_serial: true
+ - id: mypy-task-sdk
+ stages: ['manual']
+ name: Run mypy for task-sdk (manual)
+ language: python
+ entry: ../scripts/ci/prek/mypy_folder.py task-sdk
+ pass_filenames: false
+ files: ^.*\.py$
+ require_serial: true