Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/bokeh/core/property/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ class PropertyValueDict(PropertyValueContainer, dict[str, T_Val]):

"""
def __init__(self, *args, **kwargs) -> None:
super().__init__(*args, **kwargs)
# Avoid unnecessary double initialization by calling __init__ on PropertyValueContainer only
PropertyValueContainer.__init__(self)
dict.__init__(self, *args, **kwargs)

def _saved_copy(self):
return dict(self)
Expand All @@ -365,7 +367,8 @@ def __setitem__(self, i, y):

@notify_owner
def clear(self):
return super().clear()
# Use dict.clear directly to avoid potential overhead of super()
return dict.clear(self)

@notify_owner
def pop(self, *args):
Expand Down