diff options
author | David Robertson <davidr@element.io> | 2022-09-05 12:13:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-05 11:13:13 +0000 |
commit | 8cb9261598becb3ed790b4268ff713f5e1122a21 (patch) | |
tree | 02beb70fe859cd5fbc7782a866c70dbc47b82d3a | |
parent | Share some metrics between the Prometheus exporter and the phone home stats (... (diff) | |
download | synapse-8cb9261598becb3ed790b4268ff713f5e1122a21.tar.xz |
Fix typechecking with latest `types-jsonschema` (#13712)
Diffstat (limited to '')
-rw-r--r-- | changelog.d/13712.misc | 1 | ||||
-rw-r--r-- | synapse/api/filtering.py | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/changelog.d/13712.misc b/changelog.d/13712.misc new file mode 100644 index 0000000000..2c4f6b19f6 --- /dev/null +++ b/changelog.d/13712.misc @@ -0,0 +1 @@ +Fix typechecking with latest types-jsonschema. diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py index b007147519..102889ac49 100644 --- a/synapse/api/filtering.py +++ b/synapse/api/filtering.py @@ -140,13 +140,13 @@ USER_FILTER_SCHEMA = { @FormatChecker.cls_checks("matrix_room_id") -def matrix_room_id_validator(room_id_str: str) -> RoomID: - return RoomID.from_string(room_id_str) +def matrix_room_id_validator(room_id_str: str) -> bool: + return RoomID.is_valid(room_id_str) @FormatChecker.cls_checks("matrix_user_id") -def matrix_user_id_validator(user_id_str: str) -> UserID: - return UserID.from_string(user_id_str) +def matrix_user_id_validator(user_id_str: str) -> bool: + return UserID.is_valid(user_id_str) class Filtering: |