| 397 | debug(self.user_config_to_json()) |
| 398 | |
| 399 | def save( |
| 400 | self, |
| 401 | dest_path: Path | None = None, |
| 402 | creds: bool = False, |
| 403 | password: str | None = None, |
| 404 | ) -> None: |
| 405 | save_path = dest_path or DEFAULT_SAVE_PATH |
| 406 | |
| 407 | if not is_valid_path(save_path): |
| 408 | warn( |
| 409 | f'Destination directory {save_path} does not exist or is not a directory\n.', |
| 410 | 'Configuration files can not be saved', |
| 411 | ) |
| 412 | return |
| 413 | |
| 414 | self.save_user_config(save_path) |
| 415 | if creds: |
| 416 | self.save_user_creds(save_path, password=password) |
| 417 | |
| 418 | def save_user_config(self, dest_path: Path) -> None: |
| 419 | if not is_valid_path(dest_path): |