Skip to content

Commit 095da5d

Browse files
Remove unnecessary return
1 parent 14e0b7b commit 095da5d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

causal_testing/specification/variable.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import lhsmdu
1111
from pandas import DataFrame
1212
from scipy.stats._distn_infrastructure import rv_generic
13-
from z3 import Bool, BoolRef, Const, EnumSort, Int, RatNumRef, Real, String, DatatypeRef
13+
from z3 import Bool, BoolRef, Const, EnumSort, Int, RatNumRef, Real, String
1414

1515
# Declare type variable
1616
T = TypeVar("T")
@@ -76,7 +76,6 @@ def __init__(self, name: str, datatype: T, distribution: rv_generic = None):
7676
def __repr__(self):
7777
return f"{self.typestring()}: {self.name}::{self.datatype.__name__}"
7878

79-
# TODO: We're going to need to implement all the supported Z3 operations like this
8079
def __ge__(self, other: Any) -> BoolRef:
8180
"""Create the Z3 expression `other >= self`.
8281
@@ -167,8 +166,6 @@ def cast(self, val: Any) -> T:
167166
return val.as_string()
168167
if (isinstance(val, (float, int, bool))) and (self.datatype in (float, int, bool)):
169168
return self.datatype(val)
170-
if issubclass(self.datatype, Enum) and isinstance(val, DatatypeRef):
171-
return self.datatype(str(val))
172169
return self.datatype(str(val))
173170

174171
def z3_val(self, z3_var, val: Any) -> T:

0 commit comments

Comments
 (0)