Skip to content

Commit 2a91724

Browse files
Bump mypy from 0.910 to 0.930 (#651)
* 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](python/mypy@v0.910...v0.930) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Update __init__.py * Update login_required_example.py * Update test_session_dict.py Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sam Bull <[email protected]>
1 parent 8ebd92d commit 2a91724

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

aiohttp_session/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(
5757
new: bool,
5858
max_age: Optional[int] = None,
5959
) -> None:
60-
self._changed = False
60+
self._changed: bool = False
6161
self._mapping: Dict[str, Any] = {}
6262
self._identity = identity if data != {} else None
6363
self._new = new if data != {} else True

demo/login_required_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async def wrapped(
3030
# actually load user from your database (e.g. with aiopg)
3131
user = DATABASE[user_id]
3232
app["user"] = user
33-
return await fn(request, *args, **kwargs) # type: ignore[call-arg]
33+
return await fn(request, *args, **kwargs)
3434

3535
return wrapped
3636

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ flake8-bugbear==22.1.11
1212
flake8-import-order==0.18.1
1313
flake8-requirements==1.5.1
1414
multidict==5.2.0
15-
mypy==0.910
15+
mypy==0.930
1616
pep257==0.7.0
1717
pre-commit==2.16.0
1818
pynacl==1.4.0

tests/test_session_dict.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def test_invalidate() -> None:
8585
s.invalidate()
8686
assert s == cast(MutableMapping[str, Any], {})
8787
assert s._changed
88-
assert s.created is not None
88+
# Mypy bug: https://github.com/python/mypy/issues/11853
89+
assert s.created is not None # type: ignore[unreachable]
8990

9091

9192
def test_invalidate2() -> None:
@@ -96,7 +97,8 @@ def test_invalidate2() -> None:
9697
s.invalidate()
9798
assert s == cast(MutableMapping[str, Any], {})
9899
assert s._changed
99-
assert s.created is not None
100+
# Mypy bug: https://github.com/python/mypy/issues/11853
101+
assert s.created is not None # type: ignore[unreachable]
100102

101103

102104
def test_operations() -> None:
@@ -153,5 +155,6 @@ def test_change() -> None:
153155

154156
s.changed()
155157
assert s._changed
158+
# Mypy bug: https://github.com/python/mypy/issues/11853
159+
assert s.created == created # type: ignore[unreachable]
156160
assert cast(MutableMapping[str, Any], {"a": {"key": "value", "key2": "val2"}}) == s
157-
assert s.created == created

0 commit comments

Comments
 (0)