Skip to content

Commit 5ea92d3

Browse files
committed
fixing PR
1 parent 1fd66f1 commit 5ea92d3

File tree

9 files changed

+266
-4
lines changed

9 files changed

+266
-4
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,4 +1593,12 @@ repos:
15931593
additional_dependencies: ['rich>=12.4.4', 'ruff==0.12.1']
15941594
files: ^providers/.*/src/airflow/providers/.*version_compat.*\.py$
15951595
require_serial: true
1596+
- id: verify-signatures
1597+
name: Verify decorators of missing operator params
1598+
language: python
1599+
entry: ./scripts/ci/pre_commit/verify_signature_consistency.py
1600+
pass_filenames: false
1601+
additional_dependencies: ['rich>=12.4.4']
1602+
always_run: true
1603+
files: ^(providers/.*/)?airflow/.*/(sensors|operators)/.*\.py$
15961604
## ONLY ADD PRE-COMMITS HERE THAT REQUIRE CI IMAGE

contributing-docs/08_static_code_checks.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,8 @@ require Breeze Docker image to be built locally.
417417
+-----------------------------------------------------------+--------------------------------------------------------+---------+
418418
| validate-operators-init | No templated field logic checks in operator __init__ | |
419419
+-----------------------------------------------------------+--------------------------------------------------------+---------+
420+
| verify-signatures | Verify decorators of missing operator params | * |
421+
+-----------------------------------------------------------+--------------------------------------------------------+---------+
420422
| yamllint | Check YAML files with yamllint | |
421423
+-----------------------------------------------------------+--------------------------------------------------------+---------+
422424
| zizmor | Run zizmor to check for github workflow syntax errors | |

dev/breeze/doc/images/output_setup.svg

Lines changed: 1 addition & 1 deletion
Loading

dev/breeze/doc/images/output_static-checks.svg

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bfb0d23efe62297165a4aacc0cddcfb1
1+
82ca9272a5640375a6c5be4768239c42

dev/breeze/src/airflow_breeze/pre_commit_ids.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
"update-version",
162162
"validate-chart-annotations",
163163
"validate-operators-init",
164+
"verify-signatures",
164165
"yamllint",
165166
"zizmor",
166167
]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/usr/bin/env python
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
from __future__ import annotations
21+
22+
import sys
23+
from pathlib import Path
24+
25+
sys.path.insert(0, str(Path(__file__).parent.resolve()))
26+
from common_precommit_utils import (
27+
initialize_breeze_precommit,
28+
run_command_via_breeze_shell,
29+
validate_cmd_result,
30+
)
31+
32+
initialize_breeze_precommit(__name__, __file__)
33+
34+
cmd_result = run_command_via_breeze_shell(
35+
["python3", "/opt/airflow/scripts/in_container/run_signature_consistency_verify.py"],
36+
backend="sqlite",
37+
skip_environment_initialization=False,
38+
)
39+
40+
validate_cmd_result(cmd_result)

0 commit comments

Comments
 (0)