fix: Utils lint fixes

This commit is contained in:
JSC
2025-07-31 21:56:03 +02:00
parent 8847131f24
commit 01bb48c206
4 changed files with 85 additions and 81 deletions

View File

@@ -3,14 +3,14 @@
def parse_cookies(cookie_header: str) -> dict[str, str]:
"""Parse HTTP cookie header into a dictionary."""
cookies = {}
cookies: dict[str, str] = {}
if not cookie_header:
return cookies
for cookie in cookie_header.split(";"):
cookie = cookie.strip()
if "=" in cookie:
name, value = cookie.split("=", 1)
for cookie_part in cookie_header.split(";"):
cookie_str = cookie_part.strip()
if "=" in cookie_str:
name, value = cookie_str.split("=", 1)
cookies[name.strip()] = value.strip()
return cookies