false positive bad-reversed-sequence when used with dicts #3940
Labels
Bug 🪲
False Positive 🦟
A message is emitted but nothing is wrong with the code
Good first issue
Friendly and approachable by new contributors
Steps to reproduce
reproducer.py:
Current behavior
Using a dictionary with reversed() causes a bad-reversed-sequence error to be emitted.
Expected behavior
This is fine in Python 3.7 and up, where dictionaries have a known order. Though they are not Sequence types as such, they do implement the
__reversed__
method.pylint --version output
pylint 2.6.0
astroid 2.4.2
Python 3.8.6 (default, Sep 25 2020, 00:00:00)
[GCC 10.2.1 20200723 (Red Hat 10.2.1-1)]
The text was updated successfully, but these errors were encountered: