mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Performance improvement using in-operator on dicts
Just a small cleanup for the existing occurrences. Using the in-operator for hash lookups is faster than using .keys() http://stackoverflow.com/questions/29314269/why-do-key-in-dict-and-key-in-dict-keys-have-the-same-output
This commit is contained in:
@@ -104,7 +104,7 @@ def get_docstring(filename, verbose=False):
|
||||
doc['notes'] = []
|
||||
doc['notes'].extend(notes)
|
||||
|
||||
if 'options' not in fragment.keys():
|
||||
if 'options' not in fragment:
|
||||
raise Exception("missing options in fragment, possibly misformatted?")
|
||||
|
||||
for key, value in fragment.items():
|
||||
|
||||
Reference in New Issue
Block a user