style(cli): simplify keyring delete matching

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
mateo 2026-08-21 04:04:40 +00:00
parent 41e192b902
commit 33b9af5248
2 changed files with 5 additions and 7 deletions

View file

@ -292,9 +292,10 @@ class KeyringVault:
match result:
case _KeyringCallAnswered():
return SecretErased()
case _KeyringCallFailed() | _KeyringCallTimedOut():
if isinstance(result, _KeyringCallTimedOut):
self.stopped_answering.set()
case _KeyringCallFailed():
return SecretStranded()
case _KeyringCallTimedOut():
self.stopped_answering.set()
return SecretStranded()

View file

@ -153,10 +153,7 @@ def storage_notice(outcome: SecretSave) -> str:
f"(owner-only) instead. For OS keychain storage, run: {KEYRING_ENABLE_HINT}"
)
case SecretTooLarge():
return (
f"Your credential is too large for the OS keychain, so it was stored in {path} "
"(owner-only) instead."
)
return f"Your credential is too large for the OS keychain, so it was stored in {path} (owner-only) instead."
case CredentialNotSaved(detail=detail):
return (
f"Signed in, but the credential could not be saved to {path}: {detail}. "