Mercurial > hg-stable
diff doc/hgmanpage.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 | 15036492a103 |
children | 9de689d20230 |
line wrap: on
line diff
--- a/doc/hgmanpage.py Sun Dec 09 23:33:16 2012 +0100 +++ b/doc/hgmanpage.py Sun Dec 09 23:33:16 2012 +0100 @@ -146,7 +146,7 @@ text.extend(cell) if not text[-1].endswith('\n'): text[-1] += '\n' - if i < len(row)-1: + if i < len(row) - 1: text.append('T}'+self._tab_char+'T{\n') else: text.append('T}\n') @@ -258,7 +258,7 @@ # ensure we get a ".TH" as viewers require it. self.head.append(self.header()) # filter body - for i in xrange(len(self.body)-1, 0, -1): + for i in xrange(len(self.body) - 1, 0, -1): # remove superfluous vertical gaps. if self.body[i] == '.sp\n': if self.body[i - 1][:4] in ('.BI ','.IP '): @@ -880,7 +880,7 @@ self.context[-3] = '.BI' # bold/italic alternate if node['delimiter'] != ' ': self.body.append('\\fB%s ' % node['delimiter']) - elif self.body[len(self.body)-1].endswith('='): + elif self.body[len(self.body) - 1].endswith('='): # a blank only means no blank in output, just changing font self.body.append(' ') else: