Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update providers path in pre-commit configuration #46575

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ repos:
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$
files: ^providers/.*/src/.*/.*\.py$
require_serial: true
- id: update-black-version
name: Update black versions everywhere (manual)
Expand Down Expand Up @@ -221,7 +221,7 @@ repos:
entry: ./scripts/ci/pre_commit/check_deferrable_default.py
pass_filenames: false
additional_dependencies: ["libcst>=1.1.0"]
files: ^(providers/src/)?airflow/.*/(sensors|operators)/.*\.py$
files: ^(providers|airflow)/.*/(sensors|operators)/.*\.py$
- repo: https://github.com/asottile/blacken-docs
rev: 1.19.1
hooks:
Expand Down Expand Up @@ -312,7 +312,7 @@ repos:
exclude: material-icons\.css$|^images/.*$|^RELEASE_NOTES\.txt$|^.*package-lock\.json$|^.*/kinglear\.txt$|^.*pnpm-lock\.yaml$
args:
- --ignore-words=docs/spelling_wordlist.txt
- --skip=providers/src/airflow/providers/*/*.rst,providers/*/docs/changelog.rst,airflow/www/*.log,docs/*/commits.rst,providers/*/docs/commits.rst,providers/*/*/docs/commits.rst,docs/apache-airflow/tutorial/pipeline_example.csv,*.min.js,*.lock,INTHEWILD.md
- --skip=providers/*/*.rst,providers/*/docs/changelog.rst,airflow/www/*.log,docs/*/commits.rst,providers/*/docs/commits.rst,providers/*/*/docs/commits.rst,docs/apache-airflow/tutorial/pipeline_example.csv,*.min.js,*.lock,INTHEWILD.md
- --exclude-file=.codespellignorelines
- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v1.0.0
Expand All @@ -338,7 +338,7 @@ repos:
language: python
entry: ./scripts/ci/pre_commit/validate_operators_init.py
pass_filenames: true
files: ^providers/src/airflow/providers/.*/(operators|transfers|sensors)/.*\.py$
files: ^providers/.*/(operators|transfers|sensors)/.*\.py$
additional_dependencies: [ 'rich>=12.4.4' ]
- id: update-providers-build-files
name: Update providers build files
Expand Down Expand Up @@ -429,15 +429,15 @@ repos:
language: python
files: ^airflow/.*\.py$
require_serial: true
exclude: ^airflow/kubernetes/|^providers/src/airflow/providers/
exclude: ^airflow/kubernetes/|^providers/
entry: ./scripts/ci/pre_commit/check_cncf_k8s_used_for_k8s_executor_only.py
additional_dependencies: ['rich>=12.4.4']
- id: check-airflow-provider-compatibility
name: Check compatibility of Providers with Airflow
entry: ./scripts/ci/pre_commit/check_provider_airflow_compatibility.py
language: python
pass_filenames: true
files: ^providers/src/airflow/providers/.*\.py$
files: ^providers/.*/src/.*/.*\.py$
additional_dependencies: ['rich>=12.4.4']
- id: check-google-re2-as-dependency
name: Check google-re2 declared as dep
Expand All @@ -446,7 +446,7 @@ repos:
language: python
pass_filenames: true
require_serial: true
files: ^providers/src/airflow/providers/.*\.py$
files: ^providers/.*\.py$
additional_dependencies: ['rich>=12.4.4']
- id: update-local-yml-file
name: Update mounts in the local yml file
Expand All @@ -460,7 +460,7 @@ repos:
description: Check dependency of SQL Providers with common data structure
entry: ./scripts/ci/pre_commit/check_common_sql_dependency.py
language: python
files: ^providers/src/airflow/providers/.*/hooks/.*\.py$
files: ^providers/.*/hooks/.*\.py$
additional_dependencies: ['rich>=12.4.4', 'pyyaml', 'packaging']
- id: update-providers-dependencies
name: Update dependencies for provider packages
Expand Down Expand Up @@ -492,7 +492,7 @@ repos:
name: Update extras in documentation
entry: ./scripts/ci/pre_commit/insert_extras.py
language: python
files: ^contributing-docs/12_airflow_dependencies_and_extras.rst$|^INSTALL$|^providers/src/airflow/providers/.*/provider\.yaml$|^Dockerfile.*
files: ^contributing-docs/12_airflow_dependencies_and_extras.rst$|^INSTALL$|^providers/.*/provider\.yaml$|^Dockerfile.*
pass_filenames: false
additional_dependencies: ['rich>=12.4.4', 'hatchling==1.27.0']
- id: check-extras-order
Expand Down Expand Up @@ -559,8 +559,8 @@ repos:
.*https://github.*[0-9]/providers/tests/system/|
.*https://github.*/main/providers/tests/system/|
.*https://github.*/master/providers/tests/system/|
.*https://github.*/main/providers/src/airflow/providers/.*/example_dags/|
.*https://github.*/master/providers/src/airflow/providers/.*/example_dags/
.*https://github.*/main/providers/.*/example_dags/|
.*https://github.*/master/providers/.*/example_dags/
pass_filenames: true
files: ^docs/apache-airflow-providers-.*\.rst
- id: check-safe-filter-usage-in-html
Expand All @@ -583,7 +583,7 @@ repos:
description: Use AirflowProviderDeprecationWarning in providers
entry: "^\\s*DeprecationWarning*"
pass_filenames: true
files: ^providers/src/airflow/providers/.*\.py$
files: ^providers/.*\.py$
- id: check-urlparse-usage-in-code
language: pygrep
name: Don't use urlparse in code
Expand Down Expand Up @@ -728,8 +728,8 @@ repos:
^airflow/decorators/.*$|
^airflow/hooks/.*$|
^airflow/operators/.*$|
^providers/src/airflow/providers/.*$|
^providers/src/airflow/providers/standard/sensors/.*$|
^providers/.*$|
^providers/standard/src/airflow/providers/standard/sensors/.*$|
^providers/.*/src/airflow/providers/.*$|
^providers/.*/src/airflow/providers/standard/sensors/.*$|
^dev/provider_packages/.*$
Expand All @@ -741,7 +741,7 @@ repos:
pass_filenames: true
files: >
(?x)
^providers/src/airflow/providers/.*\.py$|
^providers/.*/src/.*/.*\.py$|
^providers/.*/src/airflow/providers/.*\.py$
exclude: providers/standard/.*/.*\.py$
- id: check-get-lineage-collector-providers
Expand All @@ -750,7 +750,7 @@ repos:
description: Make sure you import from airflow.provider.common.compat.lineage.hook instead of
airflow.lineage.hook.
entry: ./scripts/ci/pre_commit/check_get_lineage_collector_providers.py
files: ^providers/src/airflow/providers/.*\.py$
files: ^providers/.*\.py$
exclude: ^providers/common/compat/src/airflow/providers/common/compat/.*\.py$
additional_dependencies: [ 'rich>=12.4.4' ]
- id: check-decorated-operator-implements-custom-name
Expand All @@ -764,7 +764,7 @@ repos:
name: Verify usage of Airflow deprecation classes in core
entry: category=DeprecationWarning|category=PendingDeprecationWarning
files: \.py$
exclude: ^airflow/configuration\.py$|^providers/src/airflow/providers/|^scripts/in_container/verify_providers\.py$|^(providers/)?tests/.*$|^tests_common/
exclude: ^airflow/configuration\.py$|^providers/|^scripts/in_container/verify_providers\.py$|^tests/.*$|^tests_common/
pass_filenames: true
- id: check-provide-create-sessions-imports
language: pygrep
Expand Down Expand Up @@ -802,7 +802,7 @@ repos:
name: Check if aiobotocore is an optional dependency only
entry: ./scripts/ci/pre_commit/check_aiobotocore_optional.py
language: python
files: ^providers/src/airflow/providers/.*/provider\.yaml$
files: ^providers/.*/provider\.yaml$
pass_filenames: true
additional_dependencies: ['click', 'rich>=12.4.4', 'pyyaml']
require_serial: true
Expand Down Expand Up @@ -1372,7 +1372,7 @@ repos:
stages: ['manual']
name: Run mypy for providers (manual)
language: python
entry: ./scripts/ci/pre_commit/mypy_folder.py providers/src/airflow/providers all_new_providers
entry: ./scripts/ci/pre_commit/mypy_folder.py providers/ all_new_providers
pass_filenames: false
files: ^.*\.py$
require_serial: true
Expand Down Expand Up @@ -1421,7 +1421,7 @@ repos:
name: Check templated fields mapped in operators/sensors
language: python
entry: ./scripts/ci/pre_commit/check_template_fields.py
files: ^(providers/src/)?airflow/.*/(sensors|operators)/.*\.py$
files: ^(providers|airflow)/.*/(sensors|operators)/.*\.py$
additional_dependencies: [ 'rich>=12.4.4' ]
require_serial: true
- id: update-migration-references
Expand Down
Loading