How do I get PyLint to recognize numpy members?

前端 未结 22 1137
南旧
南旧 2020-11-28 20:29

I am running PyLint on a Python project. PyLint makes many complaints about being unable to find numpy members. How can I avoid this while avoiding skipping membership check

22条回答
  •  不知归路
    2020-11-28 20:53

    There have been many different bugs reported about this over the past few years i.e. https://bitbucket.org/logilab/pylint/issue/58/false-positive-no-member-on-numpy-imports

    I'd suggest disabling for the lines where the complaints occur.

    # pylint: disable=E1103
    print np.zeros([1, 4])
    # pylint: enable=E1103
    

提交回复
热议问题