pylint
pylint copied to clipboard
False positive for E1124 (redundant-keyword-arg)
Steps to reproduce
- Run pylint over the following test case:
"""docstring"""
class PV1Axis():
"""Single-axis tracking PV."""
def __init__(self, polygon, capacity, filename, column, build_limit=None, label='PV'):
pass
class CST():
"""Concentrating solar thermal generator."""
def __init__(self, polygon, capacity, sm, shours, filename, column, build_limit=None, label='CST'):
pass
for g in [PV1Axis, CST]:
if g == CST:
for poly in range(1, 44):
g(poly, 0, 2, 6, 0, 0, build_limit=0, label='foo')
Current behavior
example.py:16: [E1124(redundant-keyword-arg), ] Argument 'build_limit' passed by position and keyword in constructor call
example.py:16: [E1124(redundant-keyword-arg), ] Argument 'label' passed by position and keyword in constructor call
Expected behavior
I don't expect to see any warnings here.
pylint --version output
pylint 2.5.2
astroid 2.4.1
Python 3.6.9 (default, Apr 18 2020, 01:56:04)
[GCC 8.4.0]
Updated with a small reproducible test case.
Still present in Pylint 2.8.3.
This was fixed somewhere along the way. Works in Pylint 2.14.5.
Need a check before 2.15.0 to understand if I mislabeled the issue or we regressed in the main branch.
It's still an issue on main.