Skip to content

Commit 7946dcf

Browse files
Pricstaskclowes
andauthored
Update type annotations in persistent provider and fix error in validation error message (#3635)
* fix validation.py * Update persistent.py --------- Co-authored-by: kclowes <[email protected]>
1 parent 0e43cdc commit 7946dcf

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Diff for: web3/_utils/validation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def validate_abi_value(abi_type: TypeStr, value: Any) -> None:
131131
)
132132
if specified_length != len(value):
133133
raise Web3TypeError(
134-
"The following array length does not the length specified"
134+
"The following array length does not match the length specified "
135135
f"by the abi-type, {abi_type}: {value}"
136136
)
137137

Diff for: web3/providers/persistent/persistent.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,15 @@ class PersistentConnectionProvider(AsyncJSONBaseProvider, ABC):
6868
logger = logging.getLogger("web3.providers.PersistentConnectionProvider")
6969
has_persistent_connection = True
7070

71-
_send_func_cache: Tuple[int, Callable[..., Coroutine[Any, Any, RPCRequest]]] = (
71+
_send_func_cache: Tuple[
72+
Optional[int], Optional[Callable[..., Coroutine[Any, Any, RPCRequest]]]
73+
] = (
7274
None,
7375
None,
7476
)
75-
_recv_func_cache: Tuple[int, Callable[..., Coroutine[Any, Any, RPCResponse]]] = (
77+
_recv_func_cache: Tuple[
78+
Optional[int], Optional[Callable[..., Coroutine[Any, Any, RPCResponse]]]
79+
] = (
7680
None,
7781
None,
7882
)

0 commit comments

Comments
 (0)