markdown: improve preprocessors type (#4588)

* markdown: improve preprocessors type

https://github.com/Python-Markdown/markdown/blob/b701c34ebd7b2d0eb319517b9a275ddf0c89608d/markdown/preprocessors.py#L46

* Apply suggestions from code review
This commit is contained in:
Shantanu
2020-09-30 14:34:24 -07:00
committed by GitHub
parent e3889c776e
commit 8879858871
+5 -5
View File
@@ -1,14 +1,14 @@
from typing import Any, Pattern
from typing import Any, Iterable, List, Pattern
from . import util
def build_preprocessors(md, **kwargs): ...
class Preprocessor(util.Processor):
def run(self, lines) -> None: ...
def run(self, lines: List[str]) -> List[str]: ...
class NormalizeWhitespace(Preprocessor):
def run(self, lines): ...
def run(self, lines: Iterable[str]) -> List[str]: ...
class HtmlBlockPreprocessor(Preprocessor):
right_tag_patterns: Any
@@ -17,10 +17,10 @@ class HtmlBlockPreprocessor(Preprocessor):
attrs_re: Any
left_tag_re: Any
markdown_in_raw: bool = ...
def run(self, lines): ...
def run(self, lines: Iterable[str]) -> List[str]: ...
class ReferencePreprocessor(Preprocessor):
TITLE: str = ...
RE: Pattern
TITLE_RE: Pattern
def run(self, lines): ...
def run(self, lines: List[str]) -> List[str]: ...