diff options
author | Sergei Lebedev <185856+superbobry@users.noreply.github.com> | 2018-11-23 12:39:05 +0000 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-11-23 13:39:05 +0100 |
commit | bc25da2681ceef9560c13d1e412aa79c49c67a57 (patch) | |
tree | 6d84e3f692848de8d99614e746106a4bf78f4f15 /ChangeLog | |
parent | 6e37ca37a78024dcc79ceb2431b0dfebd526f3ad (diff) | |
download | pylint-git-bc25da2681ceef9560c13d1e412aa79c49c67a57.tar.gz |
Fixed literal-comparison for the case of 0 and 1 (#2601)
Prior to this commit literal-comparison did not fire for the following
comparisons
x is 0
x is 1
due to a subtle bug in the checker implementation. The skip condition
in the ``ComparisonChecker._check_literal_comparison`` was
literal.value in (True, False, None)
which holds for True/False/None _as well as_ 0 and 1, since 0 == False
and 1 == True.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -173,6 +173,8 @@ Release date: TBA * Add a new check 'implicit-str-concat-in-sequence' to spot string concatenation inside lists, sets & tuples. + * ``literal-comparison`` is now emitted for 0 and 1 literals. + What's New in Pylint 2.1.1? =========================== |