mirror of
https://github.com/powerline/powerline.git
synced 2025-07-23 05:46:01 +02:00
Do not use second argument to itertools.count in other place
This commit is contained in:
parent
4449489e59
commit
25627363b0
@ -44,12 +44,12 @@ def getconfigargspec(obj):
|
|||||||
argspec = getargspec(obj)
|
argspec = getargspec(obj)
|
||||||
args = []
|
args = []
|
||||||
defaults = []
|
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
|
if ((arg == 'segment_info' and getattr(obj, 'powerline_requires_segment_info', None)) or
|
||||||
arg == 'pl'):
|
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]
|
||||||
defaults.append(default)
|
defaults.append(default)
|
||||||
args.append(arg)
|
args.append(arg)
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user