You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pylint emits a false positive too-many-function-args in the following situation:
fromdataclassesimportdataclass, field@dataclassclassA:
_foo: bool=field(init=False)
def__post_init__(self) ->None:
self._foo=True@dataclassclassB:
bar: bool@dataclassclassC(A, B):
passa=A()
asserta._foo# no errorb=B(False)
assertnotb.bar# no errorc=C(False) # too-many-function-argsassertnotc.barassertc._foo
Note: This is new in pylint==2.15.0. There is no false positive with pylint==2.14.5.
Configuration
No response
Command used
pylint --disable all --enable too-many-function-args example.py
Pylint output
************* Module bug
bug.py:27:4: E1121: Too many positional arguments for constructor call (too-many-function-args)
------------------------------------------------------------------
Your code has been rated at 6.88/10 (previous run: 6.88/10, +0.00)
Bug description
pylint
emits a false positivetoo-many-function-args
in the following situation:Note: This is new in
pylint==2.15.0
. There is no false positive withpylint==2.14.5
.Configuration
No response
Command used
Pylint output
Expected behavior
pylint
should not raisetoo-many-function-args
Pylint version
OS / Environment
macOS Monterey 12.5.1
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: