V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
blinue
V2EX  ›  Python

关于 pylint 对 cv2 报错的问题

  •  
  •   blinue ·
    Blinue · 2019-08-21 12:02:12 +08:00 via Android · 1391 次点击
    这是一个创建于 1703 天前的主题,其中的信息可能已经有所发展或是发生改变。

    网络上提到的使用--generate-members 真是荒谬,它根本不是 pylint 的选项,它之所以能工作,是因为 pylint 失败了。没人指出过这个问题吗?

    官网的解决方案无法解决所有问题,似乎只能禁止“ no-member ”错误了,各位有更好的解决方案吗?

    2 条回复    2019-08-23 16:17:28 +08:00
    chenstack
        1
    chenstack  
       2019-08-23 10:31:01 +08:00
    github 上 pylint 的 issue 有人提供了方案:
    --extension-pkg-whitelist=cv2
    具体见
    https://github.com/PyCQA/pylint/issues/2888
    https://github.com/PyCQA/pylint/issues/2426
    blinue
        2
    blinue  
    OP
       2019-08-23 16:17:28 +08:00 via Android
    @chenstack 我说的官网解决方法就有它,这个选项无法解决所有问题,比如访问__version__依然报错
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2912 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 02:51 · PVG 10:51 · LAX 19:51 · JFK 22:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.