Mercurial > public > mercurial-scm > hg-stable
diff mercurial/ui.py @ 18054:b35e3364f94a
check-code: there must also be whitespace between ')' and operator
The check pattern only checked for whitespace between keyword and operator.
Now it also warns:
> x = f(),7
missing whitespace after ,
> x = f()+7
missing whitespace in expression
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sun, 09 Dec 2012 23:33:16 +0100 |
parents | e7cfe3587ea4 |
children | 18242716a014 |
line wrap: on
line diff
--- a/mercurial/ui.py Sun Dec 09 23:33:16 2012 +0100 +++ b/mercurial/ui.py Sun Dec 09 23:33:16 2012 +0100 @@ -613,7 +613,7 @@ ('&None', 'E&xec', 'Sym&link') Responses are case insensitive. If ui is not interactive, the default is returned. """ - resps = [s[s.index('&')+1].lower() for s in choices] + resps = [s[s.index('&') + 1].lower() for s in choices] while True: r = self.prompt(msg, resps[default]) if r.lower() in resps: