mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-08 20:43:25 +08:00
markdown: improve preprocessors type (#4588)
* markdown: improve preprocessors type
b701c34ebd/markdown/preprocessors.py (L46)
* Apply suggestions from code review
This commit is contained in:
10
third_party/2and3/markdown/preprocessors.pyi
vendored
10
third_party/2and3/markdown/preprocessors.pyi
vendored
@@ -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