Skip to content

Commit

Permalink
markdown: Fix Pattern.handleMatch type
Browse files Browse the repository at this point in the history
Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk committed Nov 10, 2020
1 parent 0ad2383 commit bf8626d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions third_party/2and3/markdown/inlinepatterns.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Any, Optional
from typing import Any, Match, Optional, Tuple, Union
from xml.etree.ElementTree import Element

def build_inlinepatterns(md, **kwargs): ...

Expand Down Expand Up @@ -39,14 +40,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): ...
class SimpleTextInlineProcessor(InlineProcessor): ...
Expand Down

0 comments on commit bf8626d

Please sign in to comment.