-
Notifications
You must be signed in to change notification settings - Fork 7k
Open
Labels
P2Important issue, but not time-criticalImportant issue, but not time-criticalcommunity-backlogcoreIssues that should be addressed in Ray CoreIssues that should be addressed in Ray CoreenhancementRequest for new feature and/or capabilityRequest for new feature and/or capabilitypythonPull requests that update Python codePull requests that update Python codeusability
Description
Description
protoc can do this using --pyi-out see here
Use case
Example code that doesn't type check in vscode/pyright
def ping(address: str) -> ray_client_pb2.ClusterInfoResponse:
with grpc.insecure_channel(address) as channel:
stub = ray_client_pb2_grpc.RayletDriverStub(channel)
return stub.ClusterInfo(ray_client_pb2.ClusterInfoRequest(type="PING"))
Errors with:
/Users/tekumara/code/ray-demo/raydemo/ping.py:9:27 - error: Variable not allowed in type expression (reportInvalidTypeForm)
/Users/tekumara/code/ray-demo/raydemo/ping.py:12:67 - error: No parameter named "type" (reportCallIssue)
ray 2.44.1
Metadata
Metadata
Assignees
Labels
P2Important issue, but not time-criticalImportant issue, but not time-criticalcommunity-backlogcoreIssues that should be addressed in Ray CoreIssues that should be addressed in Ray CoreenhancementRequest for new feature and/or capabilityRequest for new feature and/or capabilitypythonPull requests that update Python codePull requests that update Python codeusability