This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 3 files changed +12
-11
lines changed
synapse/storage/databases/main
3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change
1
+ Add type hints to storage classes.
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ exclude = (?x)
46
46
|synapse/storage/databases/main/push_rule.py
47
47
|synapse/storage/databases/main/receipts.py
48
48
|synapse/storage/databases/main/room.py
49
- |synapse/storage/databases/main/room_batch.py
50
49
|synapse/storage/databases/main/roommember.py
51
50
|synapse/storage/databases/main/search.py
52
51
|synapse/storage/databases/main/signatures.py
@@ -183,6 +182,9 @@ disallow_untyped_defs = True
183
182
[mypy-synapse.storage.databases.main.client_ips]
184
183
disallow_untyped_defs = True
185
184
185
+ [mypy-synapse.storage.databases.main.room_batch]
186
+ disallow_untyped_defs = True
187
+
186
188
[mypy-synapse.storage.util.*]
187
189
disallow_untyped_defs = True
188
190
Original file line number Diff line number Diff line change @@ -39,13 +39,11 @@ async def get_insertion_event_id_by_batch_id(
39
39
40
40
async def store_state_group_id_for_event_id (
41
41
self , event_id : str , state_group_id : int
42
- ) -> Optional [str ]:
43
- {
44
- await self .db_pool .simple_upsert (
45
- table = "event_to_state_groups" ,
46
- keyvalues = {"event_id" : event_id },
47
- values = {"state_group" : state_group_id , "event_id" : event_id },
48
- # Unique constraint on event_id so we don't have to lock
49
- lock = False ,
50
- )
51
- }
42
+ ) -> None :
43
+ await self .db_pool .simple_upsert (
44
+ table = "event_to_state_groups" ,
45
+ keyvalues = {"event_id" : event_id },
46
+ values = {"state_group" : state_group_id , "event_id" : event_id },
47
+ # Unique constraint on event_id so we don't have to lock
48
+ lock = False ,
49
+ )
You can’t perform that action at this time.
0 commit comments