Skip to content

Commit afe055d

Browse files
committedNov 29, 2024·
fix: Hugo comments
1 parent 5028e86 commit afe055d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
 

‎src/aleph/sdk/client/http.py

-3
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,3 @@ async def get_message_status(self, item_hash: str) -> MessageStatus:
467467
if resp.status == HTTPNotFound.status_code:
468468
raise MessageNotFoundError(f"No such hash {item_hash}")
469469
resp.raise_for_status()
470-
471-
data = await resp.json()
472-
return MessageStatus(**data)

‎tests/unit/aleph_vm_authentication.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Keep datetime import as is as it allow patching in test
2+
from __future__ import annotations
3+
24
import datetime
35
import functools
46
import json
@@ -74,7 +76,7 @@ def payload_must_be_hex(cls, value: bytes) -> bytes:
7476
return bytes_from_hex(value.decode())
7577

7678
@model_validator(mode="after")
77-
def check_expiry(cls, values: "SignedPubKeyHeader") -> "SignedPubKeyHeader":
79+
def check_expiry(cls, values: SignedPubKeyHeader) -> SignedPubKeyHeader:
7880
"""Check that the token has not expired"""
7981
payload: bytes = values.payload
8082
content = SignedPubKeyPayload.model_validate_json(payload)
@@ -86,7 +88,7 @@ def check_expiry(cls, values: "SignedPubKeyHeader") -> "SignedPubKeyHeader":
8688
return values
8789

8890
@model_validator(mode="after")
89-
def check_signature(cls, values: "SignedPubKeyHeader") -> "SignedPubKeyHeader":
91+
def check_signature(cls, values: SignedPubKeyHeader) -> SignedPubKeyHeader:
9092
signature: bytes = values.signature
9193
payload: bytes = values.payload
9294
content = SignedPubKeyPayload.model_validate_json(payload)

0 commit comments

Comments
 (0)
Please sign in to comment.