python - 如何在 Spyder 编辑器中抑制某个警告?

标签 python spyder pyflakes

Spyder 中的编辑器总是在我键入该行后立即就未使用的导入/变量向我发出警告。我想禁止此类警告。我怎么做? 我希望我在 Spyder 编辑器中打开的每个文件都会发生这种情况,而不是本地修复。

我尝试在 ~/.pylintrc 中添加“disable=”,但没有成功。此外,Spyder 编辑器无论如何都使用 pyflakes。

最佳答案

你需要去

工具 > 首选项 > 编辑器 > 代码自省(introspection)/分析

并停用名为

的选项

实时代码分析

关于python - 如何在 Spyder 编辑器中抑制某个警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46568959/

相关文章:

python - 安装 python 模块 (pbr) 时出现问题

python - 尝试在 python 中对数组进行线性回归,我不断收到错误 'array must not contain infs or NaNs' 。没有 inf 或 NaN

python - Spyder 5.1.5 在运行自定义函数后创建新内核

python - 禁用 Spyder 中的 linting(来自 Pyflakes 的橙色三角形)

Python - 列表字典

python - 如何从 Google Colab 笔记本中的 gmplot draw 命令查看 html 输出文件?

python - Python 上的 Return 语句似乎不起作用(在 Spyder 上)

python - 使用 pyflakes/pylint 忽略 doctests/docstrings

python - 如何避免 flake 8's "F821 undefined name '_' “when _ has been installed by gettext?

python - 使用 Python/PIL 或类似工具来缩小空格