File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -414,9 +414,7 @@ def values(self, new_value):
414
414
self ._values = [dtypes .get (v , self .dtype ) for v in new_value ]
415
415
416
416
# Validate and inform user if the current values cardinality is violated
417
- valid = validation .Validation (self )
418
- for err in valid .errors :
419
- print ("%s: %s" % (err .rank .capitalize (), err .msg ))
417
+ self ._values_cardinality_validation ()
420
418
421
419
@property
422
420
def value_origin (self ):
@@ -553,6 +551,13 @@ def val_cardinality(self, new_value):
553
551
self ._val_cardinality = format_cardinality (new_value )
554
552
555
553
# Validate and inform user if the current values cardinality is violated
554
+ self ._values_cardinality_validation ()
555
+
556
+ def _values_cardinality_validation (self ):
557
+ """
558
+ Runs a validation to check whether the values cardinality
559
+ is respected and prints a warning message otherwise.
560
+ """
556
561
valid = validation .Validation (self )
557
562
for err in valid .errors :
558
563
print ("%s: %s" % (err .rank .capitalize (), err .msg ))
You can’t perform that action at this time.
0 commit comments