We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a451a50 commit 489ca7cCopy full SHA for 489ca7c
ipywidgets/widgets/widget_link.py
@@ -19,6 +19,12 @@ class WidgetTraitTuple(Tuple):
19
20
def __init__(self, **kwargs):
21
super().__init__(Instance(Widget), Unicode(), **kwargs)
22
+ if "default_value" not in kwargs and not kwargs.get("allow_none", False):
23
+ # This is to keep consistent behavior for spec generation between traitlets 4 and 5
24
+ # Having a default empty container is explicitly not allowed in traitlets 5 when
25
+ # there are traits specified (as the default value will be invalid), but we do it
26
+ # anyway as there is no empty "default" that makes sense.
27
+ self.default_args = ()
28
29
def validate_elements(self, obj, value):
30
value = super().validate_elements(obj, value)
0 commit comments