How do I get PyLint to recognize numpy members?

前端 未结 22 1038
南旧
南旧 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:56

    Probably, it's confused with numpy's abstruse method of methods import. Namely, zeros is in fact numpy.core.multiarray.zeros, imported in numpy with statement

    from .core import *
    

    in turn imported with

    from .numeric import *
    

    and in numeric you'll find

    zeros = multiarray.zeros
    

    I guess I would be confused in place of PyLint!

    See this bug for PyLint side of view.

提交回复
热议问题