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" )
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?
|closed by||<not specified>|