(path_str: str)
| 163 | |
| 164 | @staticmethod |
| 165 | def _resolve_zip_path(path_str: str): |
| 166 | for match in reversed(list(re.finditer(r'[\\/]', path_str))): |
| 167 | with contextlib.suppress( |
| 168 | FileNotFoundError, |
| 169 | IsADirectoryError, |
| 170 | NotADirectoryError, |
| 171 | PermissionError, |
| 172 | ): |
| 173 | inner = path_str[match.end() :].replace('\\', '/') + '/' |
| 174 | yield zipfile.Path(path_str[: match.start()], inner.lstrip('/')) |
| 175 | |
| 176 | def resource_path(self, resource): |
| 177 | """ |