mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:26:06 -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
|
@ -165,7 +165,9 @@ def get_localpart_from_id(string):
|
|||
DS = TypeVar("DS", bound="DomainSpecificString")
|
||||
|
||||
|
||||
class DomainSpecificString(namedtuple("DomainSpecificString", ("localpart", "domain"))):
|
||||
class DomainSpecificString(
|
||||
namedtuple("DomainSpecificString", ("localpart", "domain")), metaclass=abc.ABCMeta
|
||||
):
|
||||
"""Common base class among ID/name strings that have a local part and a
|
||||
domain name, prefixed with a sigil.
|
||||
|
||||
|
@ -175,8 +177,6 @@ class DomainSpecificString(namedtuple("DomainSpecificString", ("localpart", "dom
|
|||
'domain' : The domain part of the name
|
||||
"""
|
||||
|
||||
__metaclass__ = abc.ABCMeta
|
||||
|
||||
SIGIL = abc.abstractproperty() # type: str # type: ignore
|
||||
|
||||
# Deny iteration because it will bite you if you try to create a singleton
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue