Fix SyncId type hint & remove debug prints

This commit is contained in:
miruka 2020-05-10 15:07:21 -04:00
parent 7048a0ac08
commit f4dca1c2c9
3 changed files with 2 additions and 4 deletions

View File

@ -4,4 +4,4 @@
from typing import Tuple, Union from typing import Tuple, Union
SyncId = Union[str, Tuple[str]] SyncId = Union[str, Tuple[str, ...]]

View File

@ -31,8 +31,7 @@ class ModelStore(UserDict):
if is_tuple and len(key) == 3 and key[2] == "filtered_members": if is_tuple and len(key) == 3 and key[2] == "filtered_members":
model = FilteredMembers(user_id=key[0], room_id=key[1]) model = FilteredMembers(user_id=key[0], room_id=key[1])
else: else:
model = Model(sync_id=key) model = Model(sync_id=key) # type: ignore
print( key, model)
self.data[key] = model self.data[key] = model
return model return model

View File

@ -72,7 +72,6 @@ QtObject {
function onModelItemDeleted(syncId, index, count=1) { function onModelItemDeleted(syncId, index, count=1) {
// print("delete", syncId, index, count) // print("delete", syncId, index, count)
print(syncId, index, count)
ModelStore.get(syncId).remove(index, count) ModelStore.get(syncId).remove(index, count)
} }