Delete API key from keyring and fallback file.
(self)
| 295 | |
| 296 | from codewiki.src.be.backend import is_caw_provider |
| 297 | if not is_caw_provider(self._config.provider): |
| 298 | # Check if API key is set |
| 299 | if self.get_api_key() is None: |
| 300 | return False |
| 301 | |
| 302 | # Check if config is complete |
| 303 | return self._config.is_complete() |
| 304 | |
| 305 | def delete_api_key(self): |
| 306 | """Delete API key from keyring and fallback file.""" |
| 307 | if self._keyring_available: |
| 308 | try: |
| 309 | keyring.delete_password(KEYRING_SERVICE, KEYRING_API_KEY_ACCOUNT) |
| 310 | except (KeyringError, Exception): |
| 311 | pass |
| 312 | # Also remove fallback credentials file |
| 313 | if CREDENTIALS_FILE.exists(): |