Remove Any in stubs/grpcio/grpc_status/rpc_status.pyi (#13895)

This commit is contained in:
Avasam
2025-04-28 02:43:46 -04:00
committed by GitHub
parent 0dedc39f22
commit 23f94ffbc4
3 changed files with 3 additions and 16 deletions
+1
View File
@@ -45,6 +45,7 @@
"stubs/geopandas",
"stubs/google-cloud-ndb",
"stubs/grpcio/grpc/__init__.pyi",
"stubs/grpcio/grpc_status/rpc_status.pyi",
"stubs/hdbcli/hdbcli/dbapi.pyi",
"stubs/html5lib",
"stubs/httplib2",
@@ -1,8 +0,0 @@
from __future__ import annotations
from grpc import Status
from grpc_status import to_status
# XXX: to_status actually expects a "google.rpc.status.Status",
# but the stubs for that aren't present yet.
status: Status = to_status(None)
+2 -8
View File
@@ -1,13 +1,7 @@
from typing import Any
import grpc
# XXX: don't yet know how to add a stub for google.rpc.status_pb2.Status
# without affecting other stuff; may need to make a stub-only package for
# google.rpc as well.
# Returns a google.rpc.status.Status message corresponding to a given grpc.Call.
def from_call(call: grpc.Call) -> Any: ...
def from_call(call: grpc.Call): ...
# Convert a google.rpc.status.Status message to grpc.Status.
def to_status(status: Any) -> grpc.Status: ...
def to_status(status) -> grpc.Status: ...