diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 49e74d453d09d..65e3a0895b2cf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -174,6 +174,13 @@ repos: language: python additional_dependencies: ['rich>=12.4.4'] require_serial: true + - id: check-imports-in-providers + name: Check imports in providers + entry: ./scripts/ci/pre_commit/check_imports_in_providers.py + language: python + additional_dependencies: ['rich>=12.4.4', "ruff==0.8.1"] + files: ^providers/src/airflow/providers/.*\.py$ + require_serial: true - id: update-common-sql-api-stubs name: Check and update common.sql API stubs entry: ./scripts/ci/pre_commit/update_common_sql_api_stubs.py diff --git a/contributing-docs/08_static_code_checks.rst b/contributing-docs/08_static_code_checks.rst index 01d8f9d303ee8..0775c83ef0621 100644 --- a/contributing-docs/08_static_code_checks.rst +++ b/contributing-docs/08_static_code_checks.rst @@ -182,6 +182,8 @@ require Breeze Docker image to be built locally. +-----------------------------------------------------------+--------------------------------------------------------+---------+ | check-hooks-apply | Check if all hooks apply to the repository | | +-----------------------------------------------------------+--------------------------------------------------------+---------+ +| check-imports-in-providers | Check imports in providers | | ++-----------------------------------------------------------+--------------------------------------------------------+---------+ | check-incorrect-use-of-LoggingMixin | Make sure LoggingMixin is not used alone | | +-----------------------------------------------------------+--------------------------------------------------------+---------+ | check-init-decorator-arguments | Sync model __init__ and decorator arguments | | diff --git a/dev/breeze/doc/images/output_static-checks.svg b/dev/breeze/doc/images/output_static-checks.svg index 4a51fad162631..8d78c5924b4f1 100644 --- a/dev/breeze/doc/images/output_static-checks.svg +++ b/dev/breeze/doc/images/output_static-checks.svg @@ -1,4 +1,4 @@ - +