mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
templater: rename variable "i" to "v" in runmap()
I want to reuse "i" for index.
This commit is contained in:
parent
d6502e3a12
commit
717a34e2df
@ -411,17 +411,17 @@ def runmap(context, mapping, data):
|
||||
else:
|
||||
raise error.ParseError(_("%r is not iterable") % d)
|
||||
|
||||
for i in diter:
|
||||
for v in diter:
|
||||
lm = mapping.copy()
|
||||
if isinstance(i, dict):
|
||||
lm.update(i)
|
||||
if isinstance(v, dict):
|
||||
lm.update(v)
|
||||
lm['originalnode'] = mapping.get('node')
|
||||
yield tfunc(context, lm, tdata)
|
||||
else:
|
||||
# v is not an iterable of dicts, this happen when 'key'
|
||||
# has been fully expanded already and format is useless.
|
||||
# If so, return the expanded value.
|
||||
yield i
|
||||
yield v
|
||||
|
||||
def buildnegate(exp, context):
|
||||
arg = compileexp(exp[1], context, exprmethods)
|
||||
|
Loading…
Reference in New Issue
Block a user