VS Code菜单栏中依次打开 File—Preferences—Settings,搜索框中搜索“python.formatting.provider”,

然后在下拉菜单中选择autopep8,yapf,black三种之中任何一个。推荐autopep8

然后Ctrl+Alt+F会提示是否安装,选择后在vs code上方选择以哪种方式安装。

 

VS Code菜单栏中依次打开 File—Preferences—Settings,

1、搜索框中搜索“python.linting.pep8Enabled”,勾选

2、搜索框中搜索“python.linting.pylintEnabled”,勾选(推荐)

3、搜索框中搜索“python.linting.flake8Enabled”,勾选

相关文章:

  • 2022-12-23
  • 2021-04-04
  • 2021-12-26
  • 2021-12-01
  • 2021-08-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-03
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案