summary refs log tree commit diff
path: root/synapse/types.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-12-31 16:50:13 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-12-31 16:50:13 +0000
commitfce9ace555ad3bafd717a0d20c979daaf5fe1076 (patch)
treea31a9c1d7caab3e9c36f7f6f43011f808f0b9201 /synapse/types.py
parentMerge commit '03e392f78' into anoa/dinsic_release_1_23_1 (diff)
parentINSTALL: Fix setting content-type on well-known (#8793) (diff)
downloadsynapse-fce9ace555ad3bafd717a0d20c979daaf5fe1076.tar.xz
Merge commit '8ca120df7' into anoa/dinsic_release_1_23_1
Diffstat (limited to 'synapse/types.py')
-rw-r--r--synapse/types.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/types.py b/synapse/types.py

index 5e52c1eb12..7c9f716804 100644 --- a/synapse/types.py +++ b/synapse/types.py
@@ -318,14 +318,14 @@ mxid_localpart_allowed_characters = set( ) -def contains_invalid_mxid_characters(localpart): +def contains_invalid_mxid_characters(localpart: str) -> bool: """Check for characters not allowed in an mxid or groupid localpart Args: - localpart (basestring): the localpart to be checked + localpart: the localpart to be checked Returns: - bool: True if there are any naughty characters + True if there are any naughty characters """ return any(c not in mxid_localpart_allowed_characters for c in localpart)