mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2025-01-09 17:33:47 +00:00
remove use of typing.Self for compatibility
This commit is contained in:
parent
4aeed079f3
commit
606b6aa3ad
1 changed files with 1 additions and 3 deletions
|
@ -10,8 +10,6 @@ from io import BytesIO
|
||||||
|
|
||||||
from cryptography.hazmat.primitives.asymmetric import ec, rsa
|
from cryptography.hazmat.primitives.asymmetric import ec, rsa
|
||||||
|
|
||||||
from typing import Self
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
logger = logging.getLogger("ids")
|
logger = logging.getLogger("ids")
|
||||||
|
|
||||||
|
@ -45,7 +43,7 @@ class IDSIdentity:
|
||||||
self.encryption_public_key = serialize_key(parse_key(self.encryption_key).public_key())# type: ignore
|
self.encryption_public_key = serialize_key(parse_key(self.encryption_key).public_key())# type: ignore
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def decode(cls, inp: bytes) -> Self:
|
def decode(cls, inp: bytes) -> "IDSIdentity":
|
||||||
input = BytesIO(inp)
|
input = BytesIO(inp)
|
||||||
|
|
||||||
assert input.read(5) == b'\x30\x81\xF6\x81\x43' # DER header
|
assert input.read(5) == b'\x30\x81\xF6\x81\x43' # DER header
|
||||||
|
|
Loading…
Reference in a new issue