style(services): apply formatter to service registry files

This commit is contained in:
Developer
2026-06-22 14:00:07 +00:00
parent 8cdeadd6dd
commit fd534a816b
3 changed files with 12 additions and 38 deletions
@@ -34,16 +34,12 @@ def get_encryption_key() -> bytes:
"""
raw = os.environ.get(ENCRYPTION_KEY_ENV)
if not raw:
raise EncryptionKeyError(
f"{ENCRYPTION_KEY_ENV} is required to store service secrets"
)
raise EncryptionKeyError(f"{ENCRYPTION_KEY_ENV} is required to store service secrets")
key = raw.strip().encode()
try:
Fernet(key)
except (ValueError, TypeError) as exc: # pragma: no cover - validated by tests
raise EncryptionKeyError(
f"{ENCRYPTION_KEY_ENV} must be a valid Fernet key"
) from exc
raise EncryptionKeyError(f"{ENCRYPTION_KEY_ENV} must be a valid Fernet key") from exc
return key