(
self,
*,
directory: PathLike | None = None,
packages: list[str | tuple[str, str]] | None = None,
html: bool = False,
check_dir: bool = True,
follow_symlink: bool = False,
)
| 38 | |
| 39 | class StaticFiles: |
| 40 | def __init__( |
| 41 | self, |
| 42 | *, |
| 43 | directory: PathLike | None = None, |
| 44 | packages: list[str | tuple[str, str]] | None = None, |
| 45 | html: bool = False, |
| 46 | check_dir: bool = True, |
| 47 | follow_symlink: bool = False, |
| 48 | ) -> None: |
| 49 | self.directory = directory |
| 50 | self.packages = packages |
| 51 | self.all_directories = self.get_directories(directory, packages) |
| 52 | self.html = html |
| 53 | self.config_checked = False |
| 54 | self.follow_symlink = follow_symlink |
| 55 | if check_dir and directory is not None and not os.path.isdir(directory): |
| 56 | raise RuntimeError(f"Directory '{directory}' does not exist") |
| 57 | |
| 58 | def get_directories( |
| 59 | self, |
no test coverage detected