解决vs code写python代码运行正常报错的问题

最近学习python,但是由于python的编辑器pycharm占用电脑内存大导致有些配置不太好的电脑卡顿,就使用vs code写代码了,vs code集成了多种编程语言的插件。但是在使用过程中写python代码会报错的问题,而运行结果却正常,有强迫症的我找了很久问题,最终取得了战果的胜利。

 "window.zoomLevel": 0,
    "search.followSymlinks": false,
    "editor.formatOnSave": true,
    "eslint.autoFixOnSave": true,
    "editor.codeActionsOnSave": {
      "source.fixAll.tslint": true
    },
    "eslint.validate": [
      "javascript",
      "javascriptreact",
      "html",
      "vue",
      {
        "language": "vue",
        "autoFix": true
      },
      {
        "language": "typescript",
        "autoFix": true
      },
      {
        "language": "typescriptreact",
        "autoFix": true
      }
    ],
    "emmet.syntaxProfiles": {
      "javascript": "jsx",
      "vue": "html",
      "vue-html": "html"
    },
    "editor.tabSize": 2,
    "files.associations": {
      "*.vue": "vue"
    },
  
    "eslint.options": {
      "extensions": [".js", ".vue"]
    },
    "search.exclude": {
      "**de_modules": true,
      "**/bower_components": true,
      "**/dist": true
    },
    "git.confirmSync": false,
    "javascript.implicitProjectConfig.experimentalDecorators": true,
    "editor.renderWhitespace": "boundary",
    "editor.cursorBlinking": "smooth",
    "editor.minimap.enabled": true,
    "editor.minimap.renderCharacters": true,
    //"editor.fontFamily": "'Droid Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'",
    "window.title": "${dirty}${activeEditorMedium}${separator}${rootName}",
    "editor.codeLens": true,
    "editor.snippetSuggestions": "top",
    "editor.fontWeight": "none",
    "stylelint.enable": true,
    "editor.fontSize": 16,
    "editor.rulers": [
      //代码长度
      120
    ],
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "vsicons.dontShowNewVersionMessage": false,
    "powermode.enabled": true,
    "powermode.presets": "fireworks",
    "powermode.comboTimeout": 5,
    "powermode.enableShake": false,
    "powermode.backgroundMode": "mask",
    "workbench.colorTheme": "Visual Studio Dark",
    "explorer.confirmDelete": false,
    "tabnine.experimentalAutoImports": true,
    "python.autoComplete.extraPaths": [
    
    ]
  }

将此配置复制到python的setting.json文件中保存,然后关闭,系统会提示让你下载一个插件,点击install下载,然后关闭软件重新进入即可。

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

码农先生eee

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值