[pylint] Fix W1201 - Specify string format arguments as logging function parameters.
Create a new var wit the string and use the new var into logging function.
[pylint] Fix R0911. Too many return statements.
Conjugate the if stames and return one only return False and return True.
[pylint] Fix W0311 - Bad indentation.
Fix identation.