Remove pl argument and first argument to render* from docs

This commit is contained in:
ZyX 2013-04-07 14:32:20 +04:00
parent ac88a09436
commit 9250d794d7

View File

@ -44,7 +44,8 @@ class ThreadedDocumenter(autodoc.FunctionDocumenter):
if (arg == 'self' or if (arg == 'self' or
(arg == 'segment_info' and (arg == 'segment_info' and
getattr(self.object, 'powerline_requires_segment_info', None)) or getattr(self.object, 'powerline_requires_segment_info', None)) or
(method == 'render_one' and -i == len(argspec.args)) or (arg == 'pl') or
(method.startswith('render') and 1-i == len(argspec.args)) or
arg in args): arg in args):
continue continue
if argspec.defaults and len(argspec.defaults) >= -i: if argspec.defaults and len(argspec.defaults) >= -i:
@ -64,7 +65,8 @@ class ThreadedDocumenter(autodoc.FunctionDocumenter):
args = [] args = []
defaults = [] defaults = []
for i, arg in zip(count(-1, -1), reversed(argspec.args)): for i, arg in zip(count(-1, -1), reversed(argspec.args)):
if (arg == 'segment_info' and getattr(self.object, 'powerline_requires_segment_info', None)): if ((arg == 'segment_info' and getattr(self.object, 'powerline_requires_segment_info', None)) or
arg == 'pl'):
continue continue
if argspec.defaults and len(argspec.defaults) >= -i: if argspec.defaults and len(argspec.defaults) >= -i:
default = argspec.defaults[i] default = argspec.defaults[i]