(self, current_context: Context)
| 154 | ) |
| 155 | |
| 156 | def remove_and_write(self, current_context: Context): |
| 157 | # remove |
| 158 | del self._contexts[current_context.name] |
| 159 | self._current_context = None |
| 160 | |
| 161 | # write |
| 162 | contexts = [v.to_dict() for _, v in self._contexts.items()] |
| 163 | write_yaml_file( |
| 164 | {"contexts": contexts, "current-context": self._current_context}, |
| 165 | GS_CONFIG_DEFAULT_LOCATION, |
| 166 | ) |
| 167 | |
| 168 | |
| 169 | class GSConfigLoader(object): |
no test coverage detected