pylint #18860 warn on assert( a, b ?) [resolved]
James Lingard reported: A bug I have encountered several times in Python code is writing: assert( x, "x should have been True" ) rather than: assert x, "x should have been True" It would be great if pylint could catch this error. note that python2.6 already emits a warning: >>> def f(x): ... assert( x, "x should have been True" ) ... <stdin>:2: SyntaxWarning: assertion is always true, perhaps remove parentheses? | |
priority | normal |
---|---|
type | enhancement |
done in | 0.20.0 |
load | 0.200 |
load left | 0.000 |
closed by | <not specified> |
similar entities