mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-21 17:15:38 +03:00
Fix pypy repr for DomainSpecificString
This commit is contained in:
parent
58de897c77
commit
6c11bb956c
2 changed files with 7 additions and 2 deletions
|
@ -109,7 +109,7 @@ class SyncRestServlet(RestServlet):
|
|||
full_state = parse_boolean(request, "full_state", default=False)
|
||||
|
||||
logger.info(
|
||||
"/sync: user=%r, timeout=%r, since=%r,"
|
||||
"/sync: user=%s, timeout=%r, since=%r,"
|
||||
" set_presence=%r, filter_id=%r" % (
|
||||
user, timeout, since, set_presence, filter_id
|
||||
)
|
||||
|
|
|
@ -37,7 +37,7 @@ class DomainSpecificString(
|
|||
# set by:
|
||||
# users = set(user)
|
||||
def __iter__(self):
|
||||
raise ValueError("Attempted to iterate a %s" % (type(self).__name__,))
|
||||
raise ValueError("Attempted to iterate a %s" % (type(self).__name__,),)
|
||||
|
||||
# Because this class is a namedtuple of strings and booleans, it is deeply
|
||||
# immutable.
|
||||
|
@ -83,6 +83,11 @@ class DomainSpecificString(
|
|||
|
||||
__str__ = to_string
|
||||
|
||||
def __repr__(self):
|
||||
return "%r(%r, %r)" % (
|
||||
type(self).__name__, self.localpart, self.domain,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def create(cls, localpart, domain,):
|
||||
return cls(localpart=localpart, domain=domain)
|
||||
|
|
Loading…
Reference in a new issue