[openpgp] Fix pyright errors

This commit is contained in:
Philipp Hörist
2026-01-02 21:43:52 +01:00
parent be2d867f05
commit 99e33d9a1f
5 changed files with 35 additions and 13 deletions

View File

@@ -1 +1 @@
from .core import Context # noqa: F401
from .core import Context # noqa: F401 # pyright: ignore

View File

@@ -4,7 +4,6 @@ from collections.abc import Iterator
from gpg.results import DecryptResult
from gpg.results import EncryptResult
from gpg.results import Key
from gpg.results import SignResult
from gpg.results import VerifyResult

View File

@@ -50,13 +50,31 @@ class VerifyResult(Result):
is_mime: int
signatures: list[Signature]
class ImportStatus(Result): ...
class ImportStatus(Result):
fpr: str
result: int
status: int
class ImportResult(Result):
imports: ImportStatus
imported: int
imported_rsa: int
imports: list[ImportStatus]
new_revocations: int
new_signatures: int
new_sub_keys: int
new_user_ids: int
no_user_id: int
not_imported: int
secret_imported: int
secret_read: int
secret_unchanged: int
skipped_new_keys: int
skipped_v3_keys: int
unchanged: int
class GenkeyResult(Result):
_type = dict(primary=bool, sub=bool)
fpr: str
class KeylistResult(Result):
_type = dict(truncated=bool)