Skip to content

Commit c4aa7e1

Browse files
committed
fix lint error
1 parent 068a7d8 commit c4aa7e1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/a2a/server/request_handlers/grpc_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import grpc.aio
1212

1313
from grpc.aio import Metadata
14+
from grpc.aio._typing import MetadataType
1415
except ImportError as e:
1516
raise ImportError(
1617
'GrpcHandler requires grpcio and grpcio-tools to be installed. '
@@ -53,7 +54,7 @@ def build(self, context: grpc.aio.ServicerContext) -> ServerCallContext:
5354
def _get_metadata_value(
5455
context: grpc.aio.ServicerContext, key: str
5556
) -> list[str]:
56-
md = context.invocation_metadata()
57+
md: MetadataType | None = context.invocation_metadata()
5758
raw_values: list[str | bytes] = []
5859
lower_key = key.lower()
5960
if isinstance(md, Metadata):

0 commit comments

Comments
 (0)