Pylint 错误:模块"curses"没有"endwin"成员



新安装了windows-curses(并重新启动了VS Code(后,我正试图编写一个上下文管理器来抽象curses.initscr()curses.endwin()。但是,在"问题"窗格中,Pylint不断抛出以下错误:Module 'curses' has no 'endwin' member。文件运行时没有问题。为什么会发生这种情况?它是否表示有问题,或者我应该将其关闭?

目前发现的成员Pylint声称失踪:

  • endwin
  • error
  • napms

更新:添加此代码:

"python.linting.pylintArgs": [
"--extension-pkg-whitelist=curses"
]

到settings.json没有任何更改。

windows-curses提供_curses,因此您需要使用传递标志--extension-pkg-allow-list=_cursespylint

最新更新