1. Use version control to track changes in your code
2. Do not push to the master branch
3. Use continuous integration / continuous delivery (CI/CD) systems
4. Code formatters
5. Pre-commit hook
6. Linters
7. Mypy: static type checker
8. More checks to pre-commit hook
9. External tools
链接地址:https://towardsdatascience.com/nine-simple-steps-for-better-looking-python-code-87e5d9d3b1cf