refactor: prefer dictionary comphrension to loop (#6187)

This commit is contained in:
Kevin Kirsche
2023-07-29 21:55:18 -04:00
committed by GitHub
parent 2ecdb68561
commit dfe46c1b7f
+1 -5
View File
@@ -466,11 +466,7 @@ def dict_from_cookiejar(cj):
:rtype: dict
"""
cookie_dict = {}
for cookie in cj:
cookie_dict[cookie.name] = cookie.value
cookie_dict = {cookie.name: cookie.value for cookie in cj}
return cookie_dict