This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 572b633c9d Extend list of folders which are not forced to be a 
subpackage to templates (#40592)
572b633c9d is described below

commit 572b633c9dcc9911789d77b4fc95195c8d7cb596
Author: Jens Scheffler <[email protected]>
AuthorDate: Thu Jul 4 15:18:13 2024 +0200

    Extend list of folders which are not forced to be a subpackage to templates 
(#40592)
---
 scripts/ci/pre_commit/check_providers_subpackages_all_have_init.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/ci/pre_commit/check_providers_subpackages_all_have_init.py 
b/scripts/ci/pre_commit/check_providers_subpackages_all_have_init.py
index 2407bffe9a..da17f794ea 100755
--- a/scripts/ci/pre_commit/check_providers_subpackages_all_have_init.py
+++ b/scripts/ci/pre_commit/check_providers_subpackages_all_have_init.py
@@ -23,6 +23,7 @@ from glob import glob
 from pathlib import Path
 
 ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 
os.pardir, os.pardir))
+ACCEPTED_NON_INIT_DIRS = ["adr", "doc", "templates"]
 
 
 def check_dir_init_file(provider_files: list[str]) -> None:
@@ -32,7 +33,7 @@ def check_dir_init_file(provider_files: list[str]) -> None:
             continue
         path = Path(candidate_path)
         if path.is_dir() and not (path / "__init__.py").exists():
-            if path.name != "adr" and path.name != "doc":
+            if path.name not in ACCEPTED_NON_INIT_DIRS:
                 missing_init_dirs.append(path)
 
     if missing_init_dirs:

Reply via email to