diff options
author | sbagan <pnlbagan@gmail.com> | 2018-12-10 11:59:50 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2018-12-10 10:59:50 +0100 |
commit | 20d67626bcff511a713242b662e14befb2f29021 (patch) | |
tree | aad1d29693ea2e7c8bba3a44f03bbc1ec2553e7e | |
parent | 1999e56761ae862f1daca33daaa23b8b1f7f72bc (diff) | |
download | pylint-git-20d67626bcff511a713242b662e14befb2f29021.tar.gz |
Fix zip-builtin-not-iterating false positive with OrderedDict (#2634)
Add OrderedDict as accepting iterator
-rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
-rw-r--r-- | pylint/checkers/python3.py | 1 | ||||
-rw-r--r-- | pylint/test/unittest_checker_python3.py | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 463941300..1e5fd9a52 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -250,3 +250,5 @@ contributors: * Mike Miller: contributor * Sergei Lebedev: contributor + +* Sasha Bagan diff --git a/pylint/checkers/python3.py b/pylint/checkers/python3.py index 44ebf2991..572e22024 100644 --- a/pylint/checkers/python3.py +++ b/pylint/checkers/python3.py @@ -83,6 +83,7 @@ _ACCEPTS_ITERATOR = { "max", "min", "frozenset", + "OrderedDict", } ATTRIBUTES_ACCEPTS_ITERATOR = {"join", "from_iterable"} _BUILTIN_METHOD_ACCEPTS_ITERATOR = { diff --git a/pylint/test/unittest_checker_python3.py b/pylint/test/unittest_checker_python3.py index 99693549a..fc727bf3c 100644 --- a/pylint/test/unittest_checker_python3.py +++ b/pylint/test/unittest_checker_python3.py @@ -214,6 +214,7 @@ class TestPython3Checker(testutils.CheckerTestCase): "all", "enumerate", "dict", + "OrderedDict", ): self.as_argument_to_callable_constructor_test(fxn, func) |