summary refs log tree commit diff
path: root/synapse/storage/util
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2021-04-09 01:44:57 +0100
committerAndrew Morgan <andrew@amorgan.xyz>2021-04-09 01:44:57 +0100
commit0de0fe0fe72bb2e2e0044908b9b89fe489bdff5c (patch)
tree0c8a3541b2797e8055c8b171cde8d57fcba79227 /synapse/storage/util
parentChangelog (diff)
parentBugbear: Add Mutable Parameter fixes (#9682) (diff)
downloadsynapse-0de0fe0fe72bb2e2e0044908b9b89fe489bdff5c.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into anoa/allow_admins_delist_as_rooms
Diffstat (limited to 'synapse/storage/util')
-rw-r--r--synapse/storage/util/id_generators.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/synapse/storage/util/id_generators.py b/synapse/storage/util/id_generators.py

index d4643c4fdf..32d6cc16b9 100644 --- a/synapse/storage/util/id_generators.py +++ b/synapse/storage/util/id_generators.py
@@ -17,7 +17,7 @@ import logging import threading from collections import OrderedDict from contextlib import contextmanager -from typing import Dict, List, Optional, Set, Tuple, Union +from typing import Dict, Iterable, List, Optional, Set, Tuple, Union import attr @@ -91,7 +91,14 @@ class StreamIdGenerator: # ... persist event ... """ - def __init__(self, db_conn, table, column, extra_tables=[], step=1): + def __init__( + self, + db_conn, + table, + column, + extra_tables: Iterable[Tuple[str, str]] = (), + step=1, + ): assert step != 0 self._lock = threading.Lock() self._step = step