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 Mar 15, 2024
1 parent b78de43 commit 186e712
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 186e712

Please sign in to comment.