1.命令行安装:pip install flake8
2.在vscode中的用户设置(settings.json)中添加以下两行即可:(也可以搜索flake8)
"python.linting.flake8Enabled": true,
"on.formatting.provider": "yapf",
3.在代码中使用Ctrl + Shift + I进行格式化。
A few basic engineering disciplines. 1. write clean code. 2. write formatted code.
一些基本的工程学科。 写清洁代码。 2.编写格式化代码。