(self, app_names=None, *args, **kwargs)
| 153 | source_dir = "static" |
| 154 | |
| 155 | def __init__(self, app_names=None, *args, **kwargs): |
| 156 | # The list of apps that are handled |
| 157 | self.apps = [] |
| 158 | # Mapping of app names to storage instances |
| 159 | self.storages = {} |
| 160 | app_configs = apps.get_app_configs() |
| 161 | if app_names: |
| 162 | app_names = set(app_names) |
| 163 | app_configs = [ac for ac in app_configs if ac.name in app_names] |
| 164 | for app_config in app_configs: |
| 165 | app_storage = self.storage_class( |
| 166 | os.path.join(app_config.path, self.source_dir) |
| 167 | ) |
| 168 | if os.path.isdir(app_storage.location): |
| 169 | self.storages[app_config.name] = app_storage |
| 170 | if app_config.name not in self.apps: |
| 171 | self.apps.append(app_config.name) |
| 172 | super().__init__(*args, **kwargs) |
| 173 | |
| 174 | def list(self, ignore_patterns): |
| 175 | """ |
nothing calls this directly
no test coverage detected