Add pylint pre-commit and fix the pylint problems.