Problem:
When using connect as demonstrated in the official documentation, IDEs like PyCharm or VSCode incorrectly interpret the type of the returned object as WebSocketClientProtocol instead of SolanaWsClientProtocol. This leads to a lack of autocompletion and type checking for methods like logs_subscribe, which are specific to SolanaWsClientProtocol.
Steps to Reproduce:
Use the connect method in an async context as per the example in the documentation.
Try to call logs_subscribe on the returned object.
Notice that IDEs do not offer autocompletion for logs_subscribe and may show a type warning.
Expected Behavior:
The connect method should be clearly typed to return SolanaWsClientProtocol, allowing IDEs to correctly infer the available methods and properties.
Possible Solution:
Enhance the type annotations in the connect function to explicitly indicate that it returns an instance of SolanaWsClientProtocol. This could involve adjusting the function's docstring and annotations to provide more explicit guidance to both developers and tools like IDEs.
Problem: When using
connect
as demonstrated in the official documentation, IDEs like PyCharm or VSCode incorrectly interpret the type of the returned object asWebSocketClientProtocol
instead ofSolanaWsClientProtocol
. This leads to a lack of autocompletion and type checking for methods likelogs_subscribe
, which are specific toSolanaWsClientProtocol
.Steps to Reproduce:
connect
method in an async context as per the example in the documentation.logs_subscribe
on the returned object.logs_subscribe
and may show a type warning.Expected Behavior: The
connect
method should be clearly typed to returnSolanaWsClientProtocol
, allowing IDEs to correctly infer the available methods and properties.Possible Solution: Enhance the type annotations in the
connect
function to explicitly indicate that it returns an instance ofSolanaWsClientProtocol
. This could involve adjusting the function's docstring and annotations to provide more explicit guidance to both developers and tools like IDEs.Additional Context: