Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pylint: Skip use-implicit-booleaness-not-comparison
Pylint 2.12.0 introduced new checker: > Used when Pylint detects that collection literal comparison is being used to check for emptiness; Use implicit booleaness insteadof a collection classes; empty collections are considered as false Comparison of variable to equality to collection: > Lexicographical comparison between built-in collections works as follows: For two collections to compare equal, they must be of the same type, have the same length, and each pair of corresponding elements must compare equal (for example, [1,2] == (1,2) is false because the type is not the same). Collections that support order comparison are ordered the same as their first unequal elements (for example, [1,2,x] <= [1,2,y] has the same value as x <= y). If a corresponding element does not exist, the shorter collection is ordered first (for example, [1,2] < [1,2,3] is true). So, `assert value == {}` is not the same as `assert not value`. Fixes: #244 Signed-off-by: Stanislav Levin <[email protected]>
- Loading branch information