diff options
author | Jaehoon Hwang <jaehoonhwang@users.noreply.github.com> | 2021-10-17 00:31:34 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-17 09:31:34 +0200 |
commit | 59d2b545b557a7ac47955c65935889e296da941a (patch) | |
tree | a07b8d66954e630e5b8181d175fff60c423b93c7 /tests/test_pragma_parser.py | |
parent | 9098c6078551e2d3028fe65537d3b0e407c85724 (diff) | |
download | pylint-git-59d2b545b557a7ac47955c65935889e296da941a.tar.gz |
Add a warning ``use-implicit-booleaness-not-comparison`` for comparison with collection literals (#5120)
* Create a new checker; use-implicit-booleanness checker where it looks
for boolean evaluatiion with collection literals such as `()`, `[]`,
or `{}`
* Fixed invalid usage of comparison within pylint package
This closes #4774
* Ignore tuples when checking for `literal-comparison`
Closes #3031
* Merge len_checker with empty_literal checker
Moving empty literal checker with len_checker to avoid class without
iterators without boolean expressions (false positive on pandas)
Reference: https://github.com/PyCQA/pylint/pull/3821/files
* Update `len_checker` and its class `LenChecker` to `ComparisonChecker`
to reflect better usage after merging between `len_checker` and
`empty_literal_checker` and its tests.
* Fixed `consider_using_in` and `consider_iterating_dictionary` tests
that were failing due to new empty literal checkers.
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/test_pragma_parser.py')
-rw-r--r-- | tests/test_pragma_parser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_pragma_parser.py b/tests/test_pragma_parser.py index 473f2048b..7bf00c7a3 100644 --- a/tests/test_pragma_parser.py +++ b/tests/test_pragma_parser.py @@ -32,7 +32,7 @@ def test_simple_pragma_no_messages() -> None: assert match for pragma_repr in parse_pragma(match.group(2)): assert pragma_repr.action == "skip-file" - assert pragma_repr.messages == [] + assert not pragma_repr.messages def test_simple_pragma_multiple_messages() -> None: |