Pylint: False-positive E1121:Too many positional arguments for method call error

Created on 7 Jun 2018  路  2Comments  路  Source: PyCQA/pylint

Steps to reproduce

I found this evidence for the first time in Visual Studio Code. Then, I tried this on the CLI and it also happens.

  1. Put this code to myfile.py.

    class MyClass:
        def mymethod1(self):
            pass
        def mymethod2(self):
            return self.mymethod1.__get__(self, MyClass)
    
  2. Run pylint myfile.py to lint it.

Current behavior

Pylint wrongly reports E1121: Too many positional arguments for method call error.

No config file found, using default configuration
************* Module linecms.a
No config file found, using default configuration
************* Module linecms.a
C:  1, 0: Missing module docstring (missing-docstring)
C:  1, 0: Missing class docstring (missing-docstring)
C:  2, 4: Missing method docstring (missing-docstring)
C:  4, 4: Missing method docstring (missing-docstring)
E:  5,15: Too many positional arguments for method call (too-many-function-args)

--------------------------------------------------------------------
Your code has been rated at -8.00/10 (previous run: -2.86/10, -5.14)

Expected behavior

Pylint shouldn't report E1121: Too many positional arguments for method call error.

pylint --version output

No config file found, using default configuration
pylint 1.9.2,
astroid 1.6.5
Python 3.6.5 (default, Apr 14 2018, 13:17:30)
[GCC 7.3.1 20180406]

Thank you very much.

EDIT
I'm sorry I put astroid related issue here before. I had removed it and made a new issue on astroid repository.

Most helpful comment

Fixed in astroid and pylint's master. Thanks for the report!

All 2 comments

Fixed in astroid and pylint's master. Thanks for the report!

@PCManticore
Woah, that's quick. You're welcome and thank you very much for solving this issue.

Was this page helpful?
0 / 5 - 0 ratings