99import matplotlib
1010import matplotlib .cbook as cbook
1111from matplotlib import docstring , rcParams
12- from .transforms import Bbox , IdentityTransform , TransformedBbox , \
13- TransformedPath , Transform
12+ from .transforms import ( Bbox , IdentityTransform , TransformedBbox ,
13+ TransformedPath , Transform )
1414from .path import Path
1515
16- ## Note, matplotlib artists use the doc strings for set and get
16+ # Note, matplotlib artists use the doc strings for set and get
1717# methods to enable the introspection methods of setp and getp. Every
1818# set_* method should have a docstring containing the line
1919#
@@ -158,7 +158,6 @@ def convert_xunits(self, x):
158158 """
159159 ax = getattr (self , 'axes' , None )
160160 if ax is None or ax .xaxis is None :
161- #print 'artist.convert_xunits no conversion: ax=%s'%ax
162161 return x
163162 return ax .xaxis .convert_units (x )
164163
@@ -584,7 +583,7 @@ def set_clip_path(self, path, transform=None):
584583 if transform is None :
585584 if isinstance (path , Rectangle ):
586585 self .clipbox = TransformedBbox (Bbox .unit (),
587- path .get_transform ())
586+ path .get_transform ())
588587 self ._clippath = None
589588 success = True
590589 elif isinstance (path , Patch ):
@@ -866,8 +865,8 @@ def matchfunc(x):
866865 if matchfunc (c ):
867866 artists .append (c )
868867 artists .extend ([thisc for thisc in
869- c .findobj (matchfunc , include_self = False )
870- if matchfunc (thisc )])
868+ c .findobj (matchfunc , include_self = False )
869+ if matchfunc (thisc )])
871870
872871 if include_self and matchfunc (self ):
873872 artists .append (self )
@@ -924,7 +923,8 @@ def get_aliases(self):
924923 return aliases
925924
926925 _get_valid_values_regex = re .compile (
927- r"\n\s*ACCEPTS:\s*((?:.|\n)*?)(?:$|(?:\n\n))" )
926+ r"\n\s*ACCEPTS:\s*((?:.|\n)*?)(?:$|(?:\n\n))"
927+ )
928928
929929 def get_valid_values (self , attr ):
930930 """
@@ -934,7 +934,8 @@ def get_valid_values(self, attr):
934934 for a line that begins with ACCEPTS:
935935
936936 e.g., for a line linestyle, return
937- "[ ``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'steps'`` | ``'None'`` ]"
937+ "[ ``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'steps'`` | ``'None'``
938+ ]"
938939 """
939940
940941 name = 'set_%s' % attr
@@ -1094,7 +1095,7 @@ def pprint_setters_rest(self, prop=None, leadingspace=2):
10941095
10951096 lines .append ('' )
10961097 lines .append (table_formatstr )
1097- lines .append (pad + 'Property' .ljust (col0_len + 3 ) + \
1098+ lines .append (pad + 'Property' .ljust (col0_len + 3 ) +
10981099 'Description' .ljust (col1_len ))
10991100 lines .append (table_formatstr )
11001101
@@ -1121,7 +1122,6 @@ def properties(self):
11211122 getters = [name for name in dir (o )
11221123 if name .startswith ('get_' )
11231124 and six .callable (getattr (o , name ))]
1124- #print getters
11251125 getters .sort ()
11261126 d = dict ()
11271127 for name in getters :
@@ -1323,7 +1323,7 @@ def kwdoc(a):
13231323 hardcopy = matplotlib .rcParams ['docstring.hardcopy' ]
13241324 if hardcopy :
13251325 return '\n ' .join (ArtistInspector (a ).pprint_setters_rest (
1326- leadingspace = 2 ))
1326+ leadingspace = 2 ))
13271327 else :
13281328 return '\n ' .join (ArtistInspector (a ).pprint_setters (leadingspace = 2 ))
13291329
0 commit comments