Skip to content

Add numpy brain tips for numpy.append #666

@wshanks

Description

@wshanks

Steps to reproduce

astroid currently does not account for numpy.append as mentioned in #664. An example of the problem is the following file:

import numpy as np a = np.append([0], 0) a = -a 

which produces the following errors in pylint:

/tmp/test.py:3:4: E1130: bad operand type for unary -: tuple (invalid-unary-operand-type) /tmp/test.py:3:4: E1130: bad operand type for unary -: list (invalid-unary-operand-type) 

These errors are generated for pylint=1.7.2, astroid=1.5.3 and numpy=1.16.2. The errors are not generated for numpy=1.15.4.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions