From 25627363b04d0493b10a349a7aba1c0b0c60ee59 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sat, 13 Apr 2013 15:16:45 +0400 Subject: [PATCH] Do not use second argument to itertools.count in other place --- powerline/lint/inspect.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/powerline/lint/inspect.py b/powerline/lint/inspect.py index 58c83a2c..b0f0c7af 100644 --- a/powerline/lint/inspect.py +++ b/powerline/lint/inspect.py @@ -44,12 +44,12 @@ def getconfigargspec(obj): argspec = getargspec(obj) args = [] defaults = [] - for i, arg in zip(count(-1, -1), reversed(argspec.args)): + for i, arg in zip(count(1), reversed(argspec.args)): if ((arg == 'segment_info' and getattr(obj, 'powerline_requires_segment_info', None)) or arg == 'pl'): continue - if argspec.defaults and len(argspec.defaults) >= -i: - default = argspec.defaults[i] + if argspec.defaults and len(argspec.defaults) >= i: + default = argspec.defaults[-i] defaults.append(default) args.append(arg) else: