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
************* Module self
self.py:14:15: E1120: No value for argument 'self' in lambda call (no-value-for-parameter)
------------------------------------------------------------------
Your code has been rated at 6.15/10 (previous run: 6.15/10, +0.00)
Expected behavior
There should not be any pylint error in this case. Note that the assertion succeeds in this file if you run the file.
The variables f and f2 are equivalent, and the call to self.f() correctly infers that self should be passed as the first argument. However, the call to self.f2() does not infer this. The extra level of indirection caused by lambda_factory seems to cause this problem for the static analyzer.
I'am working on this issue.
Just below a brief analysis of the problem.
The problem is that f2 is not inferred as a bound method contrary to f1.
The problem arises in the BaseInstance class of the astroid.bases module in the method _wrap_attr at line 248. The test
if attr.statement().scope() == self._proxied:
failed, preventing the return of a BoundMethod instance.
Steps to reproduce
pylint self.py
Current behavior
Expected behavior
There should not be any pylint error in this case. Note that the assertion succeeds in this file if you run the file.
The variables f and f2 are equivalent, and the call to self.f() correctly infers that self should be passed as the first argument. However, the call to self.f2() does not infer this. The extra level of indirection caused by
lambda_factory
seems to cause this problem for the static analyzer.pylint --version output
The text was updated successfully, but these errors were encountered: