Skip to content

Commit

Permalink
Extend list of folders which are not forced to be a subpackage to tem…
Browse files Browse the repository at this point in the history
…plates (#40592)
  • Loading branch information
jscheffl authored Jul 4, 2024
1 parent a984d97 commit 572b633
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
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:
Expand All @@ -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:
Expand Down

0 comments on commit 572b633

Please sign in to comment.