Skip to content

False positive when using ndarray.reshape with separate arguments for each element of the shape #7883

Open
pylint-dev/astroid
#1999
@ntraut

Description

@ntraut

Bug description

# pylint: disable=missing-docstring
x = np.zeros(12)
x.reshape(3, 2, 2, order='F')

Configuration

No response

Command used

pylint a.py

Pylint output

************* Module src.a
a.py:4:0: E1121: Too many positional arguments for method call (too-many-function-args)
a.py:4:0: E1124: Argument 'order' passed by position and keyword in method call (redundant-keyword-arg)

------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)

Expected behavior

no error reported, the syntax is correct as documented here

Pylint version

pylint 2.14.5
astroid 2.11.7
Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:00:33) 
[Clang 13.0.1 ]

OS / Environment

macOS 12.6

Additional dependencies

numpy @ file:///private/var/folders/.../croots/recipe/numpy_and_numpy_base_1652801688716/work

Metadata

Metadata

Assignees

No one assigned

    Labels

    False Positive 🦟A message is emitted but nothing is wrong with the codeLib specific 💅This affect the code from a particular libraryNeeds astroid Brain 🧠Needs a brain tip in astroid (then an astroid upgrade)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions