Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Fix typechecking with latest types-jsonschema
Browse files Browse the repository at this point in the history
Closes #13708.
  • Loading branch information
David Robertson committed Sep 5, 2022
1 parent 9d2823a commit 863ccdf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions synapse/api/filtering.py
Expand Up @@ -140,13 +140,13 @@


@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:
Expand Down

0 comments on commit 863ccdf

Please sign in to comment.