Checks (recursively) if the directory contains .py or .pyc files
(folder: str)
| 838 | |
| 839 | |
| 840 | def 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 | |
| 854 | def conflicts_with_a_neighbouring_module(directory_path: str) -> bool: |
no outgoing calls