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

Commit 40932f5

Browse files
author
David Robertson
committed
Actually fix latest-deps mypy errors
1 parent 5282763 commit 40932f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

synapse/api/filtering.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@
140140

141141

142142
@FormatChecker.cls_checks("matrix_room_id")
143-
def matrix_room_id_validator(room_id_str: str) -> bool:
144-
return RoomID.is_valid(room_id_str)
143+
def matrix_room_id_validator(room_id: object) -> bool:
144+
return isinstance(room_id, str) and RoomID.is_valid(room_id)
145145

146146

147147
@FormatChecker.cls_checks("matrix_user_id")
148-
def matrix_user_id_validator(user_id_str: str) -> bool:
149-
return UserID.is_valid(user_id_str)
148+
def matrix_user_id_validator(user_id: object) -> bool:
149+
return isinstance(user_id, str) and UserID.is_valid(user_id)
150150

151151

152152
class Filtering:

0 commit comments

Comments
 (0)