From a2ed60f11c56e8043ede84d106ecf7908bda81e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 23 Dec 2021 00:03:58 +0000 Subject: [PATCH 1/4] Bump mypy from 0.910 to 0.930 Bumps [mypy](https://github.com/python/mypy) from 0.910 to 0.930. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v0.910...v0.930) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 0025c144..fc8608dd 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -12,7 +12,7 @@ flake8-bugbear==21.11.29 flake8-import-order==0.18.1 flake8-requirements==1.5.1 multidict==5.2.0 -mypy==0.910 +mypy==0.930 pep257==0.7.0 pre-commit==2.16.0 pynacl==1.4.0 From 71be84b676e11e90a0f0b88c08cdac091a6b0a97 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Tue, 28 Dec 2021 00:15:58 +0000 Subject: [PATCH 2/4] Update __init__.py --- aiohttp_session/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aiohttp_session/__init__.py b/aiohttp_session/__init__.py index d301e2b6..4d238335 100644 --- a/aiohttp_session/__init__.py +++ b/aiohttp_session/__init__.py @@ -57,7 +57,7 @@ def __init__( new: bool, max_age: Optional[int] = None, ) -> None: - self._changed = False + self._changed: bool = False self._mapping: Dict[str, Any] = {} self._identity = identity if data != {} else None self._new = new if data != {} else True From 1bc4eb14ec89d991f76b4a830cf507c719e1590a Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Tue, 28 Dec 2021 00:17:01 +0000 Subject: [PATCH 3/4] Update login_required_example.py --- demo/login_required_example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/login_required_example.py b/demo/login_required_example.py index eba7f269..ccb64920 100644 --- a/demo/login_required_example.py +++ b/demo/login_required_example.py @@ -30,7 +30,7 @@ async def wrapped( # actually load user from your database (e.g. with aiopg) user = DATABASE[user_id] app["user"] = user - return await fn(request, *args, **kwargs) # type: ignore[call-arg] + return await fn(request, *args, **kwargs) return wrapped From 8bf624c85c0d3e9b74c101f4033551586535eaf8 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Sun, 16 Jan 2022 20:13:44 +0000 Subject: [PATCH 4/4] Update test_session_dict.py --- tests/test_session_dict.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/test_session_dict.py b/tests/test_session_dict.py index b6f6ffde..13b329de 100644 --- a/tests/test_session_dict.py +++ b/tests/test_session_dict.py @@ -85,7 +85,8 @@ def test_invalidate() -> None: s.invalidate() assert s == cast(MutableMapping[str, Any], {}) assert s._changed - assert s.created is not None + # Mypy bug: https://github.com/python/mypy/issues/11853 + assert s.created is not None # type: ignore[unreachable] def test_invalidate2() -> None: @@ -96,7 +97,8 @@ def test_invalidate2() -> None: s.invalidate() assert s == cast(MutableMapping[str, Any], {}) assert s._changed - assert s.created is not None + # Mypy bug: https://github.com/python/mypy/issues/11853 + assert s.created is not None # type: ignore[unreachable] def test_operations() -> None: @@ -153,5 +155,6 @@ def test_change() -> None: s.changed() assert s._changed + # Mypy bug: https://github.com/python/mypy/issues/11853 + assert s.created == created # type: ignore[unreachable] assert cast(MutableMapping[str, Any], {"a": {"key": "value", "key2": "val2"}}) == s - assert s.created == created