summaryrefslogtreecommitdiff
path: root/src/flake8/plugins
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2017-05-27 11:54:06 -0700
committerJon Dufresne <jon.dufresne@gmail.com>2017-05-27 11:54:06 -0700
commitdb4f71288e02acc97b59389414ab2cec794436c7 (patch)
tree3c139c56182e4638fbcd1505bca6b439d4e435a5 /src/flake8/plugins
parentd890b8b6833689aa0a67abb8f406082f4dd8ad81 (diff)
downloadflake8-db4f71288e02acc97b59389414ab2cec794436c7.tar.gz
Prefer iter(dict) instead of dict.keys()
They are equivalent for iterating so remove the additional function call. Pattern identified as outdated by Lennart Regebro's PyCon 2017 talk "Prehistoric Patterns in Python" https://www.youtube.com/watch?v=V5-JH23Vk0I
Diffstat (limited to 'src/flake8/plugins')
-rw-r--r--src/flake8/plugins/_trie.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flake8/plugins/_trie.py b/src/flake8/plugins/_trie.py
index 4871abb..17c226f 100644
--- a/src/flake8/plugins/_trie.py
+++ b/src/flake8/plugins/_trie.py
@@ -90,7 +90,7 @@ class TrieNode(object):
if not self.children:
return
- for prefix in sorted(self.children.keys()):
+ for prefix in sorted(self.children):
child = self.children[prefix]
yield child
for child in child.traverse():