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

Skip to content

Commit 07e2ff4

Browse files
committed
kwdoc simplification
svn path=/trunk/matplotlib/; revision=2961
1 parent 1657003 commit 07e2ff4

File tree

10 files changed

+212
-215
lines changed

10 files changed

+212
-215
lines changed

lib/matplotlib/artist.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def pprint_setters(self, prop=None, leadingspace=2):
365365
for prop in attrs:
366366
accepts = self.get_valid_values(prop)
367367
name = self.aliased_name(prop)
368-
368+
369369
lines.append('%s%s: %s' %(pad, name, accepts))
370370
return lines
371371

@@ -501,7 +501,8 @@ def setp(h, *args, **kwargs):
501501
ret.extend( [func(val)] )
502502
return [x for x in flatten(ret)]
503503

504-
504+
def kwdoc(a):
505+
return '\n'.join(ArtistInspector(a).pprint_setters(leadingspace=8))
505506

506507
kwdocd = dict()
507-
kwdocd['Artist'] = '\n'.join(ArtistInspector(Artist).pprint_setters(leadingspace=12))
508+
kwdocd['Artist'] = kwdoc(Artist)

0 commit comments

Comments
 (0)