Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1c55a25

Browse filesBrowse files
authored
Merge pull request #12307 from anntzer/property-missing-message
Clarify missing-property error message.
2 parents f4a7fea + 4705a30 commit 1c55a25
Copy full SHA for 1c55a25

File tree

Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-1
lines changed

‎lib/matplotlib/artist.py

Copy file name to clipboardExpand all lines: lib/matplotlib/artist.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,8 @@ def _update_property(self, k, v):
965965
else:
966966
func = getattr(self, 'set_' + k, None)
967967
if not callable(func):
968-
raise AttributeError('Unknown property %s' % k)
968+
raise AttributeError('{!r} object has no property {!r}'
969+
.format(type(self).__name__, k))
969970
return func(v)
970971

971972
with cbook._setattr_cm(self, eventson=False):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.