This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add type hints to
synapse/storage/databases/main/e2e_room_keys.py
#11549Add type hints to
synapse/storage/databases/main/e2e_room_keys.py
#11549Changes from 3 commits
f3fbbed
4e6f213
bd26484
3d599bc
3cbc0e9
6772c87
320ccc1
d716c34
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous annotation was incorrect. The caller and tests expect a JsonDict to be returned:
synapse/synapse/rest/client/room_keys.py
Lines 199 to 223 in 0cc3bf9
synapse/tests/handlers/test_e2e_room_keys.py
Lines 404 to 409 in 0cc3bf9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any idea why mypy didn't spot this? I guess the tests aren't checked, but I'd hope room_keys was
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like
e2e_room_keys_handler.get_room_keys
has a@trace
decorator, which isn't annotatedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting! I think @H-Shay is taking a look at annotating that file, maybe this will show up the problem.