File tree 1 file changed +6
-0
lines changed
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -794,6 +794,8 @@ class Decreasing(GlobalConstraint):
794
794
"""
795
795
796
796
def __init__ (self , * args ):
797
+ if not is_any_list (args ):
798
+ raise TypeError ("Decreasing expects a list, but got" , args )
797
799
super ().__init__ ("decreasing" , flatlist (args ))
798
800
799
801
def decompose (self ):
@@ -816,6 +818,8 @@ class IncreasingStrict(GlobalConstraint):
816
818
"""
817
819
818
820
def __init__ (self , * args ):
821
+ if not is_any_list (args ):
822
+ raise TypeError ("IncreasingStrict expects a list, but got" , args )
819
823
super ().__init__ ("strictly_increasing" , flatlist (args ))
820
824
821
825
def decompose (self ):
@@ -838,6 +842,8 @@ class DecreasingStrict(GlobalConstraint):
838
842
"""
839
843
840
844
def __init__ (self , * args ):
845
+ if not is_any_list (args ):
846
+ raise TypeError ("DecreasingStrict expects a list, but got" , args )
841
847
super ().__init__ ("strictly_decreasing" , flatlist (args ))
842
848
843
849
def decompose (self ):
You can’t perform that action at this time.
0 commit comments