| Conditions | 3 |
| Total Lines | 9 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from collections.abc import Mapping |
||
| 10 | def _mount_static_files(named_paths: Mapping[str, Path]) -> list[Mount]: |
||
| 11 | mounts = [] |
||
| 12 | for name, path in named_paths.items(): |
||
| 13 | if not name.startswith('__'): |
||
| 14 | index_file = path / 'index.html' |
||
| 15 | static_files = StaticFiles(directory=path, html=index_file.exists(), check_dir=True) |
||
| 16 | mount = Mount(path=f"/{name}", app=static_files, name=name) |
||
| 17 | mounts.append(mount) |
||
| 18 | return mounts |
||
| 19 | |||
| 31 |