Fix PEP8 for [core] and [modules] issue #125

Some suggestions for PEP8 validations.

Only few E501 remain (line too long), some which contain long urls, others which contain SQL requests, which I don't really know how to split.

Some changes may be discussed here, especially the ones about 'if statements'.