Refactoring with pylint report