mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-05 04:36:52 +00:00
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
This commit is contained in:
parent
d890b8b683
commit
db4f71288e
5 changed files with 6 additions and 6 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue