Hi James,

On 08 mars 14:45, James Lingard wrote:
> The following patch fixes various problems with warnings C0322 (Operator not
> preceded by a space) and C0323 (Operator not followed by a space), in
> particular:
> 
> 1.  These warnings incorrectly warned about uses of the >> and << operators.
> 2.  These warnings didn't recognize the <> operator.
> 3.  These warnings didn't recognize all the augmented assignment operators
> (namely //=, %=, **=, >>=, <<=, &=, ^= and |=).
> 
> For example:
> 
> x = 0
> 
> # All of the following lines incorrectly generate warnings.
> print 1>> 2
> print 1<< 2
> print 1 >>2
> print 1 <<2
> 
> # The following line fails to generate a C0322 or C0323 warning
> # (though it does generate a W0331 warning).
> print 1<>2
> 
> # The following lines fail to generate any warnings.
> x//= 2
> x**= 2
> x&= 2
> x^= 2
> x|= 2
> 
> # The following lines do generate warnings, but the ^^^s in the warning text
> # point to only part of the operators (a very cosmetic issue).
> x%= 2
> x<<= 2
> x>>= 2
> x %=2
> x <<=2
> x >>=2

That sounds cool! Would you please update test/input/func_format.py  
test/messages/func_format.txt according to your example so tests get updated
as well ? (you can run it using  "python test_func.py func_format")

Thanks 
-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to