diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fd869767d7555..60091624ea398 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -239,6 +239,14 @@ repos: # libcst doesn't have source wheels for all PY except PY3.12, excluding it additional_dependencies: ['libcst>=1.8.1'] files: ^(providers/.*/)?airflow/.*/(sensors|operators)/.*\.py$ + - id: check-provider-exclusions-python-version + name: Check Provider Python Version Exclusions + entry: ./scripts/ci/pre_commit/check_exclusion_of_provider_python_version.py + language: python + pass_filenames: true + require_serial: true + files: ^(providers/.*/(pyproject.toml|provider.yaml)|dev/breeze/src/airflow_breeze/global_constants.py)$ + additional_dependencies: ['pyyaml>=6.0.2', 'tomli>=2.0.1', "packaging>=25"] - repo: https://github.com/asottile/blacken-docs rev: 1.19.1 hooks: diff --git a/contributing-docs/08_static_code_checks.rst b/contributing-docs/08_static_code_checks.rst index be119583cff43..793dcd8a13847 100644 --- a/contributing-docs/08_static_code_checks.rst +++ b/contributing-docs/08_static_code_checks.rst @@ -215,6 +215,8 @@ require Breeze Docker image to be built locally. +-----------------------------------------------------------+--------------------------------------------------------+---------+ | check-provider-docs-valid | Validate provider doc files | | +-----------------------------------------------------------+--------------------------------------------------------+---------+ +| check-provider-exclusions-python-version | Check Provider Python Version Exclusions | | ++-----------------------------------------------------------+--------------------------------------------------------+---------+ | check-provider-yaml-valid | Validate provider.yaml files | * | +-----------------------------------------------------------+--------------------------------------------------------+---------+ | check-providers-subpackages-init-file-exist | Provider subpackage init files are there | | diff --git a/dev/breeze/doc/images/output_static-checks.svg b/dev/breeze/doc/images/output_static-checks.svg index 0857d08d9d606..8391aa303ad74 100644 --- a/dev/breeze/doc/images/output_static-checks.svg +++ b/dev/breeze/doc/images/output_static-checks.svg @@ -1,4 +1,4 @@ - +