summaryrefslogtreecommitdiff
path: root/tests
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 /tests
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 'tests')
-rw-r--r--tests/unit/test_plugin_type_manager.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test_plugin_type_manager.py b/tests/unit/test_plugin_type_manager.py
index 186c2e3..4e69cee 100644
--- a/tests/unit/test_plugin_type_manager.py
+++ b/tests/unit/test_plugin_type_manager.py
@@ -205,7 +205,7 @@ class FakePluginTypeManager(manager.NotifierBuilderMixin):
def __init__(self, manager):
"""Initialize with our fake manager."""
- self.names = sorted(manager.keys())
+ self.names = sorted(manager)
self.manager = manager