Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit a5e6b65

Browse files
fix: avoid deleting items while iterating (#772)
Updates `google.auth.external_account.Credentials#info` to not delete items in the dictionary while iterating.
1 parent f97499c commit a5e6b65

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎google/auth/external_account.py‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,7 @@ def info(self):
142142
"client_id": self._client_id,
143143
"client_secret": self._client_secret,
144144
}
145-
# Remove None fields in the info dictionary.
146-
for k, v in dict(config_info).items():
147-
if v is None:
148-
del config_info[k]
149-
150-
return config_info
145+
return {key: value for key, value in config_info.items() if value is not None}
151146

152147
@property
153148
def service_account_email(self):

0 commit comments

Comments
 (0)