Skip to content

Commit 899f1e7

Browse files
authored
Simplify isinstance call in extra_func.py
1 parent 6b59c4e commit 899f1e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

protovalidate/internal/extra_func.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ def cel_is_inf(val: celtypes.Value, sign: typing.Optional[celtypes.Value] = None
332332

333333

334334
def cel_unique(val: celtypes.Value) -> celpy.Result:
335-
if not isinstance(val, celtypes.ListType) and not isinstance(val, list):
335+
if not isinstance(val, (celtypes.ListType, list)):
336336
msg = "invalid argument, expected list"
337337
raise celpy.CELEvalError(msg)
338338
return celtypes.BoolType(len(val) == len(set(val)))

0 commit comments

Comments
 (0)