We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
isinstance
extra_func.py
1 parent 6b59c4e commit 899f1e7Copy full SHA for 899f1e7
1 file changed
protovalidate/internal/extra_func.py
@@ -332,7 +332,7 @@ def cel_is_inf(val: celtypes.Value, sign: typing.Optional[celtypes.Value] = None
332
333
334
def cel_unique(val: celtypes.Value) -> celpy.Result:
335
- if not isinstance(val, celtypes.ListType) and not isinstance(val, list):
+ if not isinstance(val, (celtypes.ListType, list)):
336
msg = "invalid argument, expected list"
337
raise celpy.CELEvalError(msg)
338
return celtypes.BoolType(len(val) == len(set(val)))
0 commit comments