diff --git a/third_party/2and3/markdown/inlinepatterns.pyi b/third_party/2and3/markdown/inlinepatterns.pyi index d2b71305ce4f..166d4245111d 100644 --- a/third_party/2and3/markdown/inlinepatterns.pyi +++ b/third_party/2and3/markdown/inlinepatterns.pyi @@ -1,4 +1,6 @@ -from typing import Any, Optional +from re import Match +from typing import Any, Optional, Tuple, Union +from xml.etree.ElementTree import Element def build_inlinepatterns(md, **kwargs): ... @@ -39,14 +41,14 @@ class Pattern: @property def markdown(self): ... def getCompiledRegExp(self): ... - def handleMatch(self, m) -> None: ... + def handleMatch(self, m: Match) -> Optional[Union[str, Element]]: ... def type(self): ... def unescape(self, text): ... class InlineProcessor(Pattern): safe_mode: bool = ... def __init__(self, pattern, md: Optional[Any] = ...) -> None: ... - def handleMatch(self, m, data) -> None: ... # type: ignore + def handleMatch(self, m: Match, data) -> Union[Tuple[Element, int, int], Tuple[None, None, None]]: ... # type: ignore[override] class SimpleTextPattern(Pattern): pass