vscode E1101 警告问题

 pylint E1101:Module 'matplotlib.cm' has no 'hot' member @vscodepython

https://github.com/pytorch/pytorch/issues/701git

Instead of ignoring, you can now do:
 
[TYPECHECK]
 
# List of members which are set dynamically and missed by pylint inference
# system, and so shouldn't trigger E1101 when accessed. Python regular
# expressions are accepted.
generated-members=numpy.*,torch.*

Follow the above cue, vscode setting should begithub

"python.linting.pylintArgs":
        [
            "--generated-members=matplotlib.*, pygame.*",
        ],

 

  1. 在terminal里 (例如Windows 平台的powershell)导航到项目所在目录;
  2. 为Pylint生成rcfile文件:
    1 pylint --generate-rcfile > .pylintrc
  3. 打开生成的文件.pylintrc,将模块名添加至白名单:extension-pkg-whitelist=xxx。以 lxml为例,结果为:shell

相关文章
相关标签/搜索