MCPcopy
hub / github.com/zappa/Zappa / contains_python_files_or_subdirs

Function contains_python_files_or_subdirs

zappa/utilities.py:840–851  ·  view source on GitHub ↗

Checks (recursively) if the directory contains .py or .pyc files

(folder: str)

Source from the content-addressed store, hash-verified

838
839
840def contains_python_files_or_subdirs(folder: str) -> bool:
841 """
842 Checks (recursively) if the directory contains .py or .pyc files
843 """
844 folder_path = Path(folder)
845 # Check for .py files
846 if any(folder_path.rglob("*.py")):
847 return True
848 # Check for .pyc files
849 if any(folder_path.rglob("*.pyc")):
850 return True
851 return False
852
853
854def conflicts_with_a_neighbouring_module(directory_path: str) -> bool:

Callers 2

create_lambda_zipMethod · 0.85

Calls

no outgoing calls

Tested by 1