diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-11-21 17:21:11 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-11-21 17:21:11 +0200 |
commit | 770dd9e70b7235e6268fb4581f1db23ab18c6cd7 (patch) | |
tree | 41c1817f2f803eed307227e6f722485a9eb00553 /ChangeLog | |
parent | 1b46d4808e1d58a3d40bb3040c648c5ef3e4edb3 (diff) | |
download | pylint-770dd9e70b7235e6268fb4581f1db23ab18c6cd7.tar.gz |
Added a new refactoring warning, 'simplifiable-if-statement'
This is used when an if statement could be reduced to a boolean evaluation
of its test, as seen in this example:
if some_cond:
return True
else:
return False
could be reduced to `return bool(some_cond)`
Closes issue #698.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -3,6 +3,10 @@ ChangeLog for Pylint -- + * Added a new refactoring warning, 'simplifiable-if-statement', + used when an if statement could be reduced to a boolean evaluation + of its test. Closes issue #698. + * Added a new refactoring warning, 'too-many-boolean-expressions', used when a if statement contains too many boolean expressions, which makes the code less maintainable and harder to understand. |