![](/img/trans.png)
[英]DiscordPy Disable Command: Command Which Disable A Specific Command In A Specific Server
[英]Disable Pylance for a specific command
我在 Visual Studio Code 中使用Python 交互式。
我有时会使用display
命令,该命令在侧面打开的 Notebook 中运行良好,但 Pylance 将其标记为: "display" is not defined Pylance(reportUndefinedVariable)
。 这可能是因为我在一个.py
文件中,该文件无法识别此命令,但是在运行 VSCode 时,它工作得很好。
我想(仅)忽略此警告,我该怎么做?
插图:
x = 42
display(x) # Pylance flags this
谢谢。
Pylance 不能只抑制这种警告,它只能抑制一种类型的警告,例如:
"python.analysis.diagnosticSeverityOverrides": {
"reportUndefinedVariable": "none"
},
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.