oqpy
oqpy copied to clipboard
Variable declaration does not check input type
For (possibly) all variables types (e.g. BoolVar
, IntVar
) etc, we do not do any type validation/conversion if the user tries to create a variable with a value that is not a boolean or integer.
Some suggests for cases where we should consider converting instead of failing:
BoolVar(1, "i")
--> BoolVar(True, "i")
IntVar(1.0, "j")
--> IntVar(1, "j")
There may also be some other cases where it would make more sense to warn & convert instead of failing.