Skip to content

Commit

Permalink
refactor: prefer dictionary comphrension to loop (#6187)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Kirsche committed Jul 30, 2023
1 parent 2ecdb68 commit dfe46c1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions requests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit dfe46c1

Please sign in to comment.