mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-13 09:02:11 -04:00
Add some type hints to datastore (#12485)
This commit is contained in:
parent
63ba9ba38b
commit
b76f1a4d5f
12 changed files with 188 additions and 84 deletions
|
@ -14,7 +14,7 @@
|
|||
# limitations under the License.
|
||||
import logging
|
||||
import re
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Pattern, Tuple
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Pattern, Tuple, cast
|
||||
|
||||
from synapse.appservice import (
|
||||
ApplicationService,
|
||||
|
@ -83,7 +83,7 @@ class ApplicationServiceWorkerStore(RoomMemberWorkerStore):
|
|||
txn.execute(
|
||||
"SELECT COALESCE(max(txn_id), 0) FROM application_services_txns"
|
||||
)
|
||||
return txn.fetchone()[0] # type: ignore
|
||||
return cast(Tuple[int], txn.fetchone())[0]
|
||||
|
||||
self._as_txn_seq_gen = build_sequence_generator(
|
||||
db_conn,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue