简体   繁体   English

如何删除 VS Code 中的特定 linting 高亮显示?

[英]How to remove a specific linting highlight in VS Code?

sometimes the python linter i use (either pylint or mypy) highlight things that aren't an issue.有时我使用的 python linter(pylint 或 mypy)会突出显示不是问题的东西。

id like to know if it is possible to ignore this specific highlight.我想知道是否可以忽略这个特定的亮点。 i just want to remove the highlight on specific places is it possible?我只是想删除特定位置的突出显示有可能吗?

(im not asking to completely remove the linter, just remove the highlight at some places that's all) (我不是要求完全移除 linter,只是移除某些地方的高光而已)

In general the # noqa command should disable linters for that line, but each tool has their own specific way as well.一般来说, # noqa命令应该禁用该行的 linter,但每个工具也有自己特定的方式。 For instance, mypy supports # type: ignore .例如,mypy 支持 #type # type: ignore

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

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