简体   繁体   English

Visual Studio Code - 删除 pylint

[英]Visual Studio Code - removing pylint

Simple question - but any steps on how to remove pylint from a Windows 10 machine with Python 3.5.2 installed.简单的问题 - 但有关如何从安装了 Python 3.5.2 的 Windows 10 机器中删除 pylint 的任何步骤。

I got an old version of pylint installed that's spellchecking on old Python 2 semantics and it's bugging the heck out of me when the squigglies show up in Visual Studio Code.我安装了一个旧版本的 pylint,它对旧的 Python 2 语义进行拼写检查,当 Visual Studio Code 中出现波浪线时,它让我大吃一惊。

Open the workspace settings file (select File > Preferences > Settings, then locate Python configuration) and edit this line like this:打开工作区设置文件(选择文件 > 首选项 > 设置,然后找到 Python 配置)并像这样编辑此行:

"python.linting.pylintEnabled": false

then save the file.然后保存文件。

If you just want to disable pylint then the updated VSCode makes it much more easier.如果您只想禁用pylint ,那么更新后的 VSCode 会更容易。

Just hit CTRL + SHIFT + P > Select linter > Disabled Linter.只需按 CTRL + SHIFT + P > 选择 linter > Disabled Linter。

Hope this helps future readers.希望这对未来的读者有所帮助。

The question was how to remove python linter, not how to disable it.问题是如何删除 python linter,而不是如何禁用它。

In order to remove pylint open Powershell/cmd and type:为了删除 pylint 打开 Powershell/cmd 并输入:

pip uninstall pylint

If you still see the problem like "Missing class docstring Pylint(missing-class-docstring" after you tried the ways suggested in this page, it may because your VS Code installed the extension Pylint , you can hit CTRL + SHIFT + X to open your installed extension list, and disable it.如果您尝试了本页建议的方法后仍然看到类似“Missing class docstring Pylint(missing-class-docstring”) 的问题,可能是因为您的 VS Code 安装了扩展Pylint ,您可以按 CTRL + SHIFT + X 打开您已安装的扩展程序列表,然后禁用它。

在此处输入图像描述

我遇到了这个问题,但是这个解决方案已经解决了 CTRL + SHIFT + P > Selecionar linter > Linter desabilitado。

I have followed all instructions here, but even though pylint was disabled in the settings and in settings.json, window reloaded and everything, it still showed pylint errors instead of flake8, which I had selected and configured.我已按照此处的所有说明进行操作,但即使在设置和 settings.json 中禁用了 pylint,重新加载了窗口等所有内容,它仍然显示 pylint 错误,而不是我选择和配置的 flake8。 It turned out I had an extension installed called "Linter" created by Nando Vieira which somehow started to overwrite the linting behaviour of Microsoft's "Python" extension.原来我安装了一个名为“Linter”的扩展,它是由 Nando Vieira 创建的,它以某种方式开始覆盖 Microsoft 的“Python”扩展的 linting 行为。 Disabling the "Linter" extension and reloading the window finally solved the problem.禁用“Linter”扩展并重新加载窗口终于解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM