Skip to content

Commit fafffd4

Browse files
Updated absent() and present() to return a CEL BoolType object rather than a Python boolean object
1 parent ebbdf62 commit fafffd4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/celpy/c7nlib.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,11 +505,11 @@ def version(
505505

506506

507507
def present(value: celtypes.StringType,) -> celtypes.Value:
508-
return cast(celtypes.Value, bool(value))
508+
return celtypes.BoolType(bool(value))
509509

510510

511511
def absent(value: celtypes.StringType,) -> celtypes.Value:
512-
return cast(celtypes.Value, not bool(value))
512+
return celtypes.BoolType(not bool(value))
513513

514514

515515
def text_from(url: celtypes.StringType,) -> celtypes.Value:

0 commit comments

Comments
 (0)