Skip to content

Commit cb68754

Browse files
authored
Fix CI (#979)
Signed-off-by: Albert Callarisa <albert@diagrid.io>
1 parent ab2a3f4 commit cb68754

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

dapr/clients/grpc/_helpers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
"""
1515

1616
from enum import Enum
17-
from typing import Any, Dict, List, Optional, Tuple, Union
17+
from typing import Any, Dict, List, Optional, Tuple, Union, cast
1818

1919
from google.protobuf import json_format
2020
from google.protobuf.any_pb2 import Any as GrpcAny
21+
from google.protobuf.descriptor import Descriptor
2122
from google.protobuf.message import Message as GrpcMessage
2223
from google.protobuf.struct_pb2 import Struct
2324
from google.protobuf.wrappers_pb2 import (
@@ -63,7 +64,7 @@ def unpack(data: GrpcAny, message: GrpcMessage) -> None:
6364
"""
6465
if not isinstance(message, GrpcMessage):
6566
raise ValueError('output message is not protocol buffer message object')
66-
if not data.Is(message.DESCRIPTOR):
67+
if not data.Is(cast(Descriptor, message.DESCRIPTOR)):
6768
raise ValueError(f'invalid type. serialized message type: {data.type_url}')
6869
data.Unpack(message)
6970

0 commit comments

Comments
 (0)