Fixed mypy

This commit is contained in:
Alex Root Junior 2022-09-11 23:28:51 +03:00
parent a88ee7a445
commit 4dfd86fd7d
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC

View file

@ -45,8 +45,7 @@ class ExceptionMessageFilter(Filter):
self,
obj: TelegramObject,
) -> Union[bool, Dict[str, Any]]:
pattern = cast(Pattern[str], self.pattern)
result = pattern.match(str(cast(ErrorEvent, obj).exception))
result = self.pattern.match(str(cast(ErrorEvent, obj).exception))
if not result:
return False
return {"match_exception": result}