(self)
| 680 | return args |
| 681 | |
| 682 | def _parse_config(self) -> dict[str, Any]: |
| 683 | config: dict[str, Any] = {} |
| 684 | config_data: str | None = None |
| 685 | creds_data: str | None = None |
| 686 | |
| 687 | if self._args.config is not None: |
| 688 | config_data = self._read_file(self._args.config) |
| 689 | elif self._args.config_url is not None: |
| 690 | config_data = self._fetch_from_url(self._args.config_url) |
| 691 | |
| 692 | if config_data is not None: |
| 693 | config.update(json.loads(config_data)) |
| 694 | |
| 695 | if self._args.creds is not None: |
| 696 | creds_data = self._read_file(self._args.creds) |
| 697 | elif self._args.creds_url is not None: |
| 698 | creds_data = self._fetch_from_url(self._args.creds_url) |
| 699 | |
| 700 | if creds_data is not None: |
| 701 | json_data = self._process_creds_data(creds_data) |
| 702 | if json_data is not None: |
| 703 | config.update(json_data) |
| 704 | |
| 705 | config = self._cleanup_config(config) |
| 706 | |
| 707 | return config |
| 708 | |
| 709 | def _process_creds_data(self, creds_data: str) -> dict[str, Any] | None: |
| 710 | if creds_data.startswith('$'): # encrypted data |
no test coverage detected