1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-02-04 07:51:50 +00:00

refactor dict from literal list (#10891)

* refactor dict from literal list

* add changelog frag
This commit is contained in:
Alexei Znamensky 2025-10-11 06:09:10 +13:00 committed by GitHub
parent 14a858fd9c
commit 5f471b8e5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 17 additions and 14 deletions

View file

@ -109,10 +109,7 @@ class SecretVariables(object):
@staticmethod
def dict_to_list(source_dict):
return [
dict(key=var[0], value=var[1])
for var in source_dict.items()
]
return [dict(key=k, value=v) for k, v in source_dict.items()]
@staticmethod
def list_to_dict(source_list, hashed=False):