False positive E1130 invalid-unary-operand-type from Numpy einsum #5821
Labels
Lib specific 💅
This affect the code from a particular library
Needs astroid Brain 🧠
Needs a brain tip in astroid (then an astroid upgrade)
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Milestone
Bug description
It seems this bug has appeared before, for example here but was fixed by #3974. Generally, return values from
numpy
functions are handled correctly but pylint seems to think that the return value fromnumpy.einsum
is ofNoneType
rather thanndarray
. Below is a code snippet to reproduce the error.Apolgies if I've missed an already opened issue for this and thanks for maintaining a great package!
Configuration
No response
Command used
Pylint output
Expected behavior
Passing output, i.e.
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
Pylint version
OS / Environment
Ubuntu 18.04.6 LTS (Bionic Beaver)
Additional dependencies
numpy
version 1.22.2The text was updated successfully, but these errors were encountered: