diff options
author | Justin Li <justinnhli@gmail.com> | 2018-12-21 00:08:25 -0800 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-12-21 09:08:25 +0100 |
commit | 5a86fddcb815ebd08fbc3ffcbaf7b11c2ba2e107 (patch) | |
tree | 7ba4ed6dd29f63954a5e40e8a93a01208b3bf66b /ChangeLog | |
parent | 73e65741e36c973f6c0b44c68a5610b7173ee285 (diff) | |
download | pylint-git-5a86fddcb815ebd08fbc3ffcbaf7b11c2ba2e107.tar.gz |
Generalize `chained-comparison` (#2655)
`chained-comparison` detects boolean expressions such as `a < b and b < c` and suggests
it should be rewritten as `a < b < c`.
The current implementation is limited in two ways. First, cannot deal with existing chain
comparisons, so it would not detect the following:
`a < b < c and c < d` # should be a < b < c < d
Second, the algorithm for detecting possible chains is simplistic, and would falsely
detect the following:
`a < b < c and b < d` # no simplification possible
This change fixes both of these issues.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -70,6 +70,11 @@ Release date: TBA Close #2565 +* Generalize ``chained-comparison`` + + Previous version incorrectly detects `a < b < c and b < d` and fails to + detect `a < b < c and c < d`. + What's New in Pylint 2.2.2? =========================== |