[openpgp] Improve type annotations
This commit is contained in:
@@ -6,10 +6,19 @@ class InvalidKey(Result): ...
|
||||
class EncryptResult(Result):
|
||||
invalid_recipients: list[Any]
|
||||
|
||||
class Recipient(Result): ...
|
||||
class Recipient(Result):
|
||||
keyid: str
|
||||
pubkey_algo: int
|
||||
status: int
|
||||
|
||||
class DecryptResult(Result):
|
||||
recipients: Recipient
|
||||
file_name: str | None
|
||||
is_de_vs: bool
|
||||
is_mime: int
|
||||
legacy_cipher_nomdc: int
|
||||
recipients: list[Recipient]
|
||||
symkey_algo: str
|
||||
wrong_key_usage: bool
|
||||
|
||||
class NewSignature(Result): ...
|
||||
|
||||
@@ -21,10 +30,25 @@ class Notation(Result): ...
|
||||
|
||||
class Signature(Result):
|
||||
_type = dict(wrong_key_usage=bool, chain_model=bool, is_de_vs=bool)
|
||||
notations: Notation
|
||||
notations: list[Notation]
|
||||
chain_model: bool
|
||||
exp_timestamp: int
|
||||
fpr: str
|
||||
hash_algo: int
|
||||
is_de_vs: bool
|
||||
pka_trust: int
|
||||
pubkey_algo: int
|
||||
status: int
|
||||
summary: int
|
||||
timestamp: int
|
||||
validity: int
|
||||
validity_reason: int
|
||||
wrong_key_usage: bool
|
||||
|
||||
class VerifyResult(Result):
|
||||
signatures: Signature
|
||||
file_name: str | None
|
||||
is_mime: int
|
||||
signatures: list[Signature]
|
||||
|
||||
class ImportStatus(Result): ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user