mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
mypy: Add google-re2-stubs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Anders Kaseorg
parent
de472a09f9
commit
ea48a283b1
@@ -1,5 +1,3 @@
|
||||
from re import Pattern
|
||||
|
||||
import re2
|
||||
import uri_template
|
||||
from django.core.exceptions import ValidationError
|
||||
@@ -19,7 +17,7 @@ from zerver.lib.types import LinkifierDict
|
||||
from zerver.models.realms import Realm
|
||||
|
||||
|
||||
def filter_pattern_validator(value: str) -> Pattern[str]:
|
||||
def filter_pattern_validator(value: str) -> "re2._Regexp[str]":
|
||||
try:
|
||||
# Do not write errors to stderr (this still raises exceptions)
|
||||
options = re2.Options()
|
||||
|
||||
Reference in New Issue
Block a user