Skip to content

Commit 76117b1

Browse files
committed
tee_registry: fix mypy on the ohttp config parser
`make check` (mypy) flagged `_parse_ohttp_config(raw: object)` as not indexable. Type the decoded on-chain tuple as `Sequence[Any]`. https://claude.ai/code/session_01L2gvK4aHX1bs3EQ61zxdkT
1 parent bde1b2a commit 76117b1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/opengradient/client/tee_registry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import random
55
import ssl
66
from dataclasses import dataclass
7-
from typing import List, NamedTuple, Optional
7+
from typing import Any, List, NamedTuple, Optional, Sequence
88

99
from web3 import Web3
1010

@@ -196,7 +196,7 @@ def get_llm_tee_ohttp_config(self) -> Optional[TEEEndpoint]:
196196
return random.choice(candidates)
197197

198198

199-
def _parse_ohttp_config(raw: object) -> Optional[OhttpConfig]:
199+
def _parse_ohttp_config(raw: Sequence[Any]) -> Optional[OhttpConfig]:
200200
"""Coerce the decoded on-chain ohttpConfig tuple into an OhttpConfig.
201201
202202
Returns None when the TEE has no OHTTP config registered (empty public key).

0 commit comments

Comments
 (0)