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

Goffi goffi at goffi.org
Lun 21 Jan 01:40:42 CET 2013


Thanks for the patches.

I have made a few minor changes:

- I have let the "from log import debug, info, error because" it was 
intentional to let them, even if I don't use them, just to avoid to 
think about the import when I need one of them. It may change in the 
future, but for now it's handy

- if have not pushed the for _, trigger instead of for priority,_trigger 
in src/tools/misc because with this we know what the first item is for, 
and the "_" is already used by gettext

- one of the patches was removing deletionError in src/memory/sqlite.py. 
In fact, it was a forgotten addErrback, I have added it in an other patch.

Anyway it's now pushed, thanks for your useful help :)

Cheers
Goffi

Le 18/01/2013 18:34, Emmanuel Gil Peyrot a écrit :
> 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/
>
>
>
> _______________________________________________
> dev mailing list
> dev at goffi.org
> http://lists.goffi.org/listinfo/dev

-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.goffi.org/pipermail/dev/attachments/20130121/4781b8d0/attachment.html>


Plus d'informations sur la liste de diffusion dev