Skip to content

[brain] numpy.ndarray.__or__ is binary #815

@eugene57

Description

@eugene57

Steps to reproduce

Lint following file:

import numpy

class BetterNDArray(numpy.ndarray):
  def __or__(self, other):
    return super().__or__(other)

This is likely caused by https://github.com/PyCQA/astroid/blob/master/astroid/brain/brain_numpy_ndarray.py#L74

Current behavior

************* Module numpy_ndarray
numpy_ndarray.py:4:2: W0235: Useless super delegation in method '__or__' (useless-super-delegation)
numpy_ndarray.py:5:11: E1121: Too many positional arguments for method call (too-many-function-args)

Expected behavior

No E1121 error.

python -c "from astroid import __pkginfo__; print(__pkginfo__.version)" output

2.4.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions