Skip to content
Merged
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
25 changes: 12 additions & 13 deletions lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1228,19 +1228,18 @@ def _update_props(self, props, errfmt):
property name for "{prop_name}".
"""
ret = []
with cbook._setattr_cm(self, eventson=False):
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff looks larger than it is. It's really just the removal of this line and unindenting the subsequent block.

for k, v in props.items():
# Allow attributes we want to be able to update through
# art.update, art.set, setp.
if k == "axes":
ret.append(setattr(self, k, v))
else:
func = getattr(self, f"set_{k}", None)
if not callable(func):
raise AttributeError(
errfmt.format(cls=type(self), prop_name=k),
name=k)
ret.append(func(v))
for k, v in props.items():
# Allow attributes we want to be able to update through
# art.update, art.set, setp.
if k == "axes":
ret.append(setattr(self, k, v))
else:
func = getattr(self, f"set_{k}", None)
if not callable(func):
raise AttributeError(
errfmt.format(cls=type(self), prop_name=k),
name=k)
ret.append(func(v))
if ret:
self.pchanged()
self.stale = True
Expand Down
Loading