[PATCH 2 of 9 pyflakes] color: avoid shadowing a variable inside a list comprehension
Augie Fackler
raf at durin42.com
Thu Nov 10 16:52:25 EST 2016
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1478813571 18000
# Thu Nov 10 16:32:51 2016 -0500
# Node ID 77dce11c461ed9d6668fbbe6ff2ea1149ded4e94
# Parent 9e9aa14582e1fb793aa831d3120d7354f2d62782
color: avoid shadowing a variable inside a list comprehension
diff --git a/hgext/color.py b/hgext/color.py
--- a/hgext/color.py
+++ b/hgext/color.py
@@ -502,8 +502,8 @@ class colorui(uimod.ui):
effects.append(l)
effects = ' '.join(effects)
if effects:
- return '\n'.join([render_effects(s, effects)
- for s in msg.split('\n')])
+ return '\n'.join([render_effects(line, effects)
+ for line in msg.split('\n')])
return msg
def uisetup(ui):
More information about the Mercurial-devel
mailing list