refactor pre-commit code style