|
@@ -166,7 +166,7 @@ class Var(ABC):
|
|
Returns:
|
|
Returns:
|
|
The stringified var.
|
|
The stringified var.
|
|
"""
|
|
"""
|
|
- return self.operation(fn="JSON.stringify")
|
|
|
|
|
|
+ return self.operation(fn="JSON.stringify", type_=str)
|
|
|
|
|
|
def __hash__(self) -> int:
|
|
def __hash__(self) -> int:
|
|
"""Define a hash function for a var.
|
|
"""Define a hash function for a var.
|
|
@@ -650,7 +650,7 @@ class Var(ABC):
|
|
Returns:
|
|
Returns:
|
|
A var representing the logical and.
|
|
A var representing the logical and.
|
|
"""
|
|
"""
|
|
- return self.operation("&&", other)
|
|
|
|
|
|
+ return self.operation("&&", other, type_=bool)
|
|
|
|
|
|
def __rand__(self, other: Var) -> Var:
|
|
def __rand__(self, other: Var) -> Var:
|
|
"""Perform a logical and.
|
|
"""Perform a logical and.
|
|
@@ -661,7 +661,7 @@ class Var(ABC):
|
|
Returns:
|
|
Returns:
|
|
A var representing the logical and.
|
|
A var representing the logical and.
|
|
"""
|
|
"""
|
|
- return self.operation("&&", other, flip=True)
|
|
|
|
|
|
+ return self.operation("&&", other, type_=bool, flip=True)
|
|
|
|
|
|
def __or__(self, other: Var) -> Var:
|
|
def __or__(self, other: Var) -> Var:
|
|
"""Perform a logical or.
|
|
"""Perform a logical or.
|
|
@@ -672,7 +672,7 @@ class Var(ABC):
|
|
Returns:
|
|
Returns:
|
|
A var representing the logical or.
|
|
A var representing the logical or.
|
|
"""
|
|
"""
|
|
- return self.operation("||", other)
|
|
|
|
|
|
+ return self.operation("||", other, type_=bool)
|
|
|
|
|
|
def __ror__(self, other: Var) -> Var:
|
|
def __ror__(self, other: Var) -> Var:
|
|
"""Perform a logical or.
|
|
"""Perform a logical or.
|
|
@@ -683,7 +683,7 @@ class Var(ABC):
|
|
Returns:
|
|
Returns:
|
|
A var representing the logical or.
|
|
A var representing the logical or.
|
|
"""
|
|
"""
|
|
- return self.operation("||", other, flip=True)
|
|
|
|
|
|
+ return self.operation("||", other, type_=bool, flip=True)
|
|
|
|
|
|
def foreach(self, fn: Callable) -> Var:
|
|
def foreach(self, fn: Callable) -> Var:
|
|
"""Return a list of components. after doing a foreach on this var.
|
|
"""Return a list of components. after doing a foreach on this var.
|