Skip to content

Commit

Permalink
fix: get_metadata deprecated since traitlets 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ManonMarchand committed Aug 5, 2024
1 parent c579fcd commit 2d4f5b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/ipywidgets/ipywidgets/widgets/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ def add_traits(self, **traits):
"""Dynamically add trait attributes to the Widget."""
super().add_traits(**traits)
for name, trait in traits.items():
if trait.get_metadata('sync'):
if 'sync' in trait.metadata:
self.keys.append(name)
self.send_state(name)

Expand Down

0 comments on commit 2d4f5b4

Please sign in to comment.