(directory: Path, filenames: List[str])
| 123 | |
| 124 | |
| 125 | def find_data_files(directory: Path, filenames: List[str]) -> Dict[str, Path]: |
| 126 | |
| 127 | found_files = {} |
| 128 | |
| 129 | def search_recursive(search_dir: Path, depth: int = 0): |
| 130 | if depth > 5: |
| 131 | return |
| 132 | |
| 133 | for item in search_dir.iterdir(): |
| 134 | if item.is_file() and item.suffix.lower() in ['.csv', '.xlsx']: |
| 135 | if item.name in filenames: |
| 136 | found_files[item.name] = item |
| 137 | elif item.is_dir() and not item.name.startswith('.'): |
| 138 | search_recursive(item, depth + 1) |
| 139 | |
| 140 | search_recursive(directory) |
| 141 | return found_files |
| 142 | |
| 143 | |
| 144 | def diagnose_task_file_issues(task_file: Path) -> Dict[str, any]: |
no test coverage detected