[dev] [en] [patch] Better pep8 support, trailing whitespaces/semicolons removal and new-style class everywhere

Emmanuel Gil Peyrot linkmauve at linkmauve.fr
Ven 18 Jan 18:34:48 CET 2013


Hello!

I’ve written a few patches for the core of Salut à Toi that try to fix
its respect of the python coding style as defined in the PEP-0008
document[1]. I also removed every trailing whitespace or semicolon and
made the switch to new-style classes[2].

Those changes are mostly cosmetic, but will certainly make the code
more readable and I hope make the whole project more attirant to the
potential contributors with knowledge of python.

As per a discussion with goffi on the SàT chatroom[3], I didn’t change
the internal method names to follow the PEP-0008 guidelines, that is to
convert them to lowercase_with_underscores (he prefers the mixedCase,
mainly to stay coherend with Twisted), but I still think that would be
much better to do it so I kept the patch to do that change, in the case
of a new issue to that debate.

Among the tools I used for that, I want to thank the very good
pep8ify[4] that made this work much easier, vim, GNU sed, and the GNU
coreutils.

[1] http://www.python.org/dev/peps/pep-0008/
[2] http://stackoverflow.com/questions/54867/old-style-and-new-style-classes-in-python
[3] xmpp:sat at chat.jabberfr.org?join
[4] http://pep8ify.com/

-- 
Emmanuel Gil Peyrot
XMPP: <linkmauve at linkmauve.fr>
OpenPGP: 24B1D609
-------------- section suivante --------------
Une pièce jointe autre que texte a été nettoyée...
Nom: non disponible
Type: application/pgp-signature
Taille: 198 octets
Desc: non disponible
URL: <http://lists.goffi.org/pipermail/dev/attachments/20130118/3e049d04/attachment.pgp>


Plus d'informations sur la liste de diffusion dev