Skip to content

Commit

Permalink
add check to find if common.compat provider is changed in a non-compa…
Browse files Browse the repository at this point in the history
…tible way

Signed-off-by: Maciej Obuchowski <[email protected]>
  • Loading branch information
mobuchowski committed Dec 13, 2024
1 parent 224a4e3 commit ed58588
Show file tree
Hide file tree
Showing 6 changed files with 233 additions and 13 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,13 @@ repos:
exclude: ^airflow/kubernetes/
entry: ./scripts/ci/pre_commit/check_airflow_k8s_not_used.py
additional_dependencies: ['rich>=12.4.4']
- id: check-common-compat-compatibility
name: Check if compat is changed in a non-compatible way
language: python
files: ^providers/src/airflow/providers/common/compat/.*\.py$
require_serial: true
entry: ./scripts/ci/pre_commit/check_common_compat_compatibility.py
additional_dependencies: ['rich>=12.4.4']
- id: check-common-compat-used-for-openlineage
name: Check common.compat is used for OL deprecated classes
language: python
Expand Down
2 changes: 2 additions & 0 deletions contributing-docs/08_static_code_checks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ require Breeze Docker image to be built locally.
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| check-code-deprecations | Check deprecations categories in decorators | |
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| check-common-compat-compatibility | Check if compat is changed in a non-compatible way | |
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| check-common-compat-used-for-openlineage | Check common.compat is used for OL deprecated classes | |
+-----------------------------------------------------------+--------------------------------------------------------+---------+
| check-core-deprecation-classes | Verify usage of Airflow deprecation classes in core | |
Expand Down
Loading

0 comments on commit ed58588

Please sign in to comment.