diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 40433b0f0f9d3..6b47cca9afbe2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -247,7 +247,7 @@ repos: - id: setup-extra-packages name: Checks if all the libraries in setup.py are listed in extra-packages-ref.rst file language: python - files: ^setup.py$|^docs/extra-packages-ref.rst$ + files: ^setup.py$|^docs/apache-airflow/extra-packages-ref.rst$ pass_filenames: false entry: ./scripts/ci/pre_commit/pre_commit_check_setup_extra_packages_ref.py additional_dependencies: ['rich==9.2.0'] diff --git a/scripts/ci/pre_commit/pre_commit_check_setup_extra_packages_ref.py b/scripts/ci/pre_commit/pre_commit_check_setup_extra_packages_ref.py index 4dee47c5d6aab..e0a5a12a6ad42 100755 --- a/scripts/ci/pre_commit/pre_commit_check_setup_extra_packages_ref.py +++ b/scripts/ci/pre_commit/pre_commit_check_setup_extra_packages_ref.py @@ -82,7 +82,7 @@ def get_extras_from_docs() -> List[str]: """ Returns an array of install packages names from installation.rst. """ - docs_content = get_file_content('docs', DOCS_FILE) + docs_content = get_file_content('docs', 'apache-airflow', DOCS_FILE) extras_section_regex = re.compile( rf'^\|[^|]+\|.*pip install .apache-airflow\[({PY_IDENTIFIER})\].', re.MULTILINE