diff --git a/pgpy/constants.py b/pgpy/constants.py index a983fec6..933c100b 100644 --- a/pgpy/constants.py +++ b/pgpy/constants.py @@ -600,6 +600,7 @@ def _missing_(cls, val: object) -> 'String2KeyType': raise TypeError(f"cannot look up String2KeyType by non-int {type(val)}") return cls.Unknown + class S2KGNUExtension(IntEnum): NoSecret = 1 Smartcard = 2 diff --git a/pgpy/pgp.py b/pgpy/pgp.py index 721ee1e1..30e39b0c 100644 --- a/pgpy/pgp.py +++ b/pgpy/pgp.py @@ -648,6 +648,7 @@ def parse(self, packet: bytes) -> None: else: raise ValueError(f"Expected: Signature. Got: {format(pkt.__class__.__name__)}") + class PGPUID(ParentRef): @property def __sig__(self): diff --git a/pgpy/types.py b/pgpy/types.py index 49c89ed6..2270f7d5 100644 --- a/pgpy/types.py +++ b/pgpy/types.py @@ -748,6 +748,7 @@ def __repr__(self): class SorteDeque(collections.deque): """A deque subclass that tries to maintain sorted ordering using bisect""" + def insort(self, item): i = bisect.bisect_left(self, item) self.rotate(- i)