Switch metaclass initialization to python 3-compatible syntax (#8326)

This commit is contained in:
Jonathan de Jong 2020-09-16 21:15:55 +02:00 committed by GitHub
parent 44dec6cbc4
commit a3f124b821
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 16 additions and 26 deletions

View file

@ -33,7 +33,7 @@ from synapse.util.stringutils import random_string
logger = logging.getLogger(__name__)
class ReplicationEndpoint:
class ReplicationEndpoint(metaclass=abc.ABCMeta):
"""Helper base class for defining new replication HTTP endpoints.
This creates an endpoint under `/_synapse/replication/:NAME/:PATH_ARGS..`
@ -72,8 +72,6 @@ class ReplicationEndpoint:
is received.
"""
__metaclass__ = abc.ABCMeta
NAME = abc.abstractproperty() # type: str # type: ignore
PATH_ARGS = abc.abstractproperty() # type: Tuple[str, ...] # type: ignore
METHOD = "POST"