diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-02-21 21:27:17 +0200 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-02-21 21:27:17 +0200 |
commit | 062999db0385f9f3f31df47f1ddbf84271ad0ab8 (patch) | |
tree | 8c7b3e7b35a8c206122890718f158116176ae9e3 /pylint/checkers/python3.py | |
parent | cbc81d3cc95b61206669c0a1905ddb2345fc3828 (diff) | |
download | pylint-062999db0385f9f3f31df47f1ddbf84271ad0ab8.tar.gz |
Fix a false positive with dict and not-iterating warnings.
dict accepts iterators, as much as set and list does.
This patch fixes this and adds tests for the other callables
for which we shouldn't emit.
Diffstat (limited to 'pylint/checkers/python3.py')
-rw-r--r-- | pylint/checkers/python3.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/checkers/python3.py b/pylint/checkers/python3.py index 8248e72..e708c4a 100644 --- a/pylint/checkers/python3.py +++ b/pylint/checkers/python3.py @@ -50,7 +50,7 @@ def _is_builtin(node): return getattr(node, 'name', None) in ('__builtin__', 'builtins') _accepts_iterator = {'iter', 'list', 'tuple', 'sorted', 'set', 'sum', 'any', - 'all', 'enumerate'} + 'all', 'enumerate', 'dict'} def _in_iterating_context(node): """Check if the node is being used as an iterator. |