|
7 | 7 | from cachebox import LRUCache # type:ignore[import-not-found]
|
8 | 8 | from google.protobuf.json_format import MessageToDict
|
9 | 9 | from google.protobuf.struct_pb2 import Struct
|
10 |
| -from schemas.protobuf.flagd.evaluation.v1 import ( # type:ignore[import-not-found] |
11 |
| - evaluation_pb2, |
12 |
| - evaluation_pb2_grpc, |
13 |
| -) |
14 | 10 |
|
15 | 11 | from openfeature.evaluation_context import EvaluationContext
|
16 | 12 | from openfeature.event import ProviderEventDetails
|
|
24 | 20 | TypeMismatchError,
|
25 | 21 | )
|
26 | 22 | from openfeature.flag_evaluation import FlagResolutionDetails, Reason
|
| 23 | +from openfeature.schemas.protobuf.flagd.evaluation.v1 import ( # type:ignore[import-not-found] |
| 24 | + evaluation_pb2, |
| 25 | + evaluation_pb2_grpc, |
| 26 | +) |
27 | 27 |
|
28 | 28 | from ..config import CacheType, Config
|
29 | 29 | from ..flag_type import FlagType
|
@@ -217,6 +217,13 @@ def _resolve( # noqa: PLR0915 C901
|
217 | 217 | context = self._convert_context(evaluation_context)
|
218 | 218 | call_args = {"timeout": self.deadline}
|
219 | 219 | try:
|
| 220 | + request: typing.Union[ |
| 221 | + evaluation_pb2.ResolveBooleanRequest, |
| 222 | + evaluation_pb2.ResolveIntRequest, |
| 223 | + evaluation_pb2.ResolveStringRequest, |
| 224 | + evaluation_pb2.ResolveObjectRequest, |
| 225 | + evaluation_pb2.ResolveFloatRequest, |
| 226 | + ] |
220 | 227 | if flag_type == FlagType.BOOLEAN:
|
221 | 228 | request = evaluation_pb2.ResolveBooleanRequest(
|
222 | 229 | flag_key=flag_key, context=context
|
|
0 commit comments