-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Return read-only collections from @cached methods
#13755
Changes from all commits
45821e1
3dad3b0
ed43ae3
1248c1e
ed6f1fe
1fe7d82
7f0f531
9d23871
d7f84d7
e76eef1
08e9135
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Re-type hint some collections as read-only. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1519,7 +1519,7 @@ async def generate_sync_result( | |
| one_time_keys_count = await self.store.count_e2e_one_time_keys( | ||
| user_id, device_id | ||
| ) | ||
| unused_fallback_key_types = ( | ||
| unused_fallback_key_types = list( | ||
| await self.store.get_e2e_unused_fallback_key_types(user_id, device_id) | ||
| ) | ||
|
Comment on lines
+1522
to
1524
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This goes straight into the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At least it's a shallow copy 🤷
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd be curious of the error here? Is something in our code unhappy or is it a type hint of like I think it'd be OK to add a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a type hint problem. Only |
||
|
|
||
|
|
@@ -2301,7 +2301,7 @@ async def _generate_room_entry( | |
| sync_result_builder: "SyncResultBuilder", | ||
| room_builder: "RoomSyncResultBuilder", | ||
| ephemeral: List[JsonDict], | ||
| tags: Optional[Dict[str, Dict[str, Any]]], | ||
| tags: Optional[Mapping[str, Mapping[str, Any]]], | ||
| account_data: Mapping[str, JsonDict], | ||
| always_include: bool = False, | ||
| ) -> None: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.