improving the code with Pylint