mirror of
https://github.com/matrix-org/synapse.git
synced 2025-01-03 23:06:44 +00:00
Fix typechecking with latest types-jsonschema
(#13712)
This commit is contained in:
parent
898fef2789
commit
8cb9261598
1
changelog.d/13712.misc
Normal file
1
changelog.d/13712.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Fix typechecking with latest types-jsonschema.
|
@ -140,13 +140,13 @@ USER_FILTER_SCHEMA = {
|
|||||||
|
|
||||||
|
|
||||||
@FormatChecker.cls_checks("matrix_room_id")
|
@FormatChecker.cls_checks("matrix_room_id")
|
||||||
def matrix_room_id_validator(room_id_str: str) -> RoomID:
|
def matrix_room_id_validator(room_id_str: str) -> bool:
|
||||||
return RoomID.from_string(room_id_str)
|
return RoomID.is_valid(room_id_str)
|
||||||
|
|
||||||
|
|
||||||
@FormatChecker.cls_checks("matrix_user_id")
|
@FormatChecker.cls_checks("matrix_user_id")
|
||||||
def matrix_user_id_validator(user_id_str: str) -> UserID:
|
def matrix_user_id_validator(user_id_str: str) -> bool:
|
||||||
return UserID.from_string(user_id_str)
|
return UserID.is_valid(user_id_str)
|
||||||
|
|
||||||
|
|
||||||
class Filtering:
|
class Filtering:
|
||||||
|
Loading…
Reference in New Issue
Block a user