Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 731f6c8

Browse files
committed
Fix matplotlib#2425: setters without arguments should not be added to the list of
parameters
1 parent e4ec9d5 commit 731f6c8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/artist.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import division, print_function
22
import re
33
import warnings
4+
import inspect
45
import matplotlib
56
import matplotlib.cbook as cbook
67
from matplotlib import docstring, rcParams
@@ -948,6 +949,8 @@ def _get_setters_and_targets(self):
948949
o = getattr(self.o, name)
949950
if not callable(o):
950951
continue
952+
if len(inspect.getargspec(o)[0]) < 2:
953+
continue
951954
func = o
952955
if self.is_alias(func):
953956
continue

0 commit comments

Comments
 (0)