Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Nov 24, 2024
1 parent 2100f04 commit aaca889
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions aiohttp/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ class CookieMixin:
@property
def cookies(self) -> SimpleCookie:
if self._cookies is None:
self._cookies = SimpleCookie() # type: ignore[misc]
self._cookies = SimpleCookie()
return self._cookies

def set_cookie(
Expand All @@ -947,7 +947,7 @@ def set_cookie(
Also updates only those params which are not None.
"""
if self._cookies is None:
self._cookies = SimpleCookie() # type: ignore[misc]
self._cookies = SimpleCookie()

self._cookies[name] = value
c = self._cookies[name]
Expand Down
4 changes: 0 additions & 4 deletions tests/test_web_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ def test_base_ctor() -> None:

assert req.keep_alive

assert "__dict__" not in dir(req)

assert req


Expand Down Expand Up @@ -109,8 +107,6 @@ def test_ctor() -> None:
assert req.raw_headers == ((b"FOO", b"bar"),)
assert req.task is req._task

assert "__dict__" not in dir(req)


def test_doubleslashes() -> None:
# NB: //foo/bar is an absolute URL with foo netloc and /bar path
Expand Down

0 comments on commit aaca889

Please sign in to comment.