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>|
- logilab-astng #903 cache for external libraries
- pylint #4983 new py2.5 check: test "yield" in "try" body with yield in exception handlers.
- pylint #9776 warning if return or break inside a finally
- pylint #4738 more synthetic output, à la pychecker
- pylint #17958 pylint -e must not silence Fatal messages