(self)
| 192 | return config |
| 193 | |
| 194 | def safe_config(self) -> dict[ArchConfigType, Any]: |
| 195 | base_config: dict[ArchConfigType, Any] = { |
| 196 | ArchConfigType.VERSION: self.version, |
| 197 | ArchConfigType.SCRIPT: self.script, |
| 198 | ArchConfigType.ARCHINSTALL_LANGUAGE: self.archinstall_language.json(), |
| 199 | } |
| 200 | |
| 201 | base_config.update(self.plain_cfg()) |
| 202 | sub_config = self.sub_cfg() |
| 203 | |
| 204 | for config_type, value in sub_config.items(): |
| 205 | if not hasattr(value, 'json'): |
| 206 | raise ValueError(f'Config value for {config_type} must implement json() method') |
| 207 | base_config[config_type] = value.json() |
| 208 | |
| 209 | return base_config |
| 210 | |
| 211 | def plain_cfg(self) -> dict[ArchConfigType, str | list[str] | bool]: |
| 212 | return { |
no test coverage detected