From 67e7b24ce2af821eb198e298496e5980427619fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Fri, 2 Jan 2026 21:44:08 +0100 Subject: [PATCH] [pgp] Fix pyright errors --- pgp/backend/python_gnupg.py | 2 +- typings/gnupg/__init__.pyi | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pgp/backend/python_gnupg.py b/pgp/backend/python_gnupg.py index c75c448..530ef34 100644 --- a/pgp/backend/python_gnupg.py +++ b/pgp/backend/python_gnupg.py @@ -59,7 +59,7 @@ class PGP(metaclass=Singleton): if result.ok: error = "" else: - error = result.status + error = result.status or "Unknown" return self._strip_header_footer(str(result)), error diff --git a/typings/gnupg/__init__.pyi b/typings/gnupg/__init__.pyi index 3263acf..80a02bb 100644 --- a/typings/gnupg/__init__.pyi +++ b/typings/gnupg/__init__.pyi @@ -105,6 +105,7 @@ class SearchKeys(StatusHandler, list[dict[Any, Any]]): class ListKeys(SearchKeys): UID_INDEX: int = ... FIELDS: list[str] = ... + fingerprints: list[str] = ... def __init__(self, gpg: GPG) -> None: ... def key(self, args: Any) -> None: ... sec: Any = ... @@ -159,6 +160,7 @@ class TrustResult(DeleteResult): ... class Sign(StatusHandler, TextHandler): returncode: int | None = ... + status: str = ... def __init__(self, gpg: GPG) -> None: ... def __nonzero__(self) -> bool: ... def __bool__(self) -> bool: ...