mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 04:25:50 +08:00
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:
+5
-5
@@ -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]: ...
|
||||
|
||||
Reference in New Issue
Block a user