pylint #9326 Variable/argument is not considered used by lambda default value [open]
When running pylint on the following program:
def f(x): return lambda x = x: x def g(x): return lambda a = x: a
pylint reports a W0613 warning on line 2; it thinks that the argument "x" is unused in the function "f". It does not report W0613 on line 4, so it considers "x" used in function "g". Since both functions are equivalent to Python, I think pylint or astng is looking up the name "x" in the default value of the lambda in the wrong context.
When "x" is not a function argument but a local variable, W0612 is reported instead of W0613. Again, it is only reported for "f" and not for "g".
|appeared in||<not specified>|
|done in||<not specified>|
|closed by||<not specified>|
- pylint #6201 exception handling w/ py >= 2.5
- pylint #3212 re-enable all warnings from the command line
- logilab-astng #3158 use logging to allow pylint to get (at least) inference error information
- pylint #9984 option to ignore a whole module
- logilab-astng #13944 false positive for class/instance attributes