mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 19:24:51 -04:00
Switch metaclass initialization to python 3-compatible syntax (#8326)
This commit is contained in:
parent
44dec6cbc4
commit
a3f124b821
8 changed files with 16 additions and 26 deletions
|
@ -29,15 +29,13 @@ from synapse.util.caches.stream_change_cache import StreamChangeCache
|
|||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class AccountDataWorkerStore(SQLBaseStore):
|
||||
# The ABCMeta metaclass ensures that it cannot be instantiated without
|
||||
# the abstract methods being implemented.
|
||||
class AccountDataWorkerStore(SQLBaseStore, metaclass=abc.ABCMeta):
|
||||
"""This is an abstract base class where subclasses must implement
|
||||
`get_max_account_data_stream_id` which can be called in the initializer.
|
||||
"""
|
||||
|
||||
# This ABCMeta metaclass ensures that we cannot be instantiated without
|
||||
# the abstract methods being implemented.
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
def __init__(self, database: DatabasePool, db_conn, hs):
|
||||
account_max = self.get_max_account_data_stream_id()
|
||||
self._account_data_stream_cache = StreamChangeCache(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue