After much testing and checking output, I was unable to recreate this bug. Closer inspection however lead to the realization that the issue did not lie with utf-8 chars, but with trailing whitespace being taken into account of the line length. I have edited the format checker to trim trailing whitespace and updated the curent func_toolonglines.py and message output to reflect the changes.
The attached txt file is the mercurial diff, and I look forward to your input. Aaron Merlino
diff -r 4a48b49c0ca0 checkers/format.py --- a/checkers/format.py Wed Mar 24 10:47:07 2010 +0100 +++ b/checkers/format.py Sun Mar 28 20:58:00 2010 -0400 @@ -307,7 +307,7 @@ """ max_chars = self.config.max_line_length for line in lines.splitlines(): - if len(line) > max_chars: + if len(line.rstrip()) > max_chars: self.add_message('C0301', line=i, args=(len(line), max_chars)) i += 1 diff -r 4a48b49c0ca0 test/input/func_toolonglines.py --- a/test/input/func_toolonglines.py Wed Mar 24 10:47:07 2010 +0100 +++ b/test/input/func_toolonglines.py Sun Mar 28 20:58:00 2010 -0400 @@ -1,4 +1,12 @@ ########################################################################################## """ that one is too long tooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo""" -__revision__ = '' +__revision__ = '1' + + +#should be fine +print "------------------------------------------------------------------------" +#should be fine +print "-----------------------------------------------------------------------é" +#whitespace after (5 spaces) +print "-----------------------------------------------------------------------é" \ No newline at end of file diff -r 4a48b49c0ca0 test/messages/func_toolonglines.txt --- a/test/messages/func_toolonglines.txt Wed Mar 24 10:47:07 2010 +0100 +++ b/test/messages/func_toolonglines.txt Sun Mar 28 20:58:00 2010 -0400 @@ -1,2 +1,3 @@ C: 1: Line too long (90/80) C: 2: Line too long (94/80) +E: 10: Non ascii characters found but no encoding specified (PEP 263)
_______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects