Skip to content

Commit 8879858

Browse files
authored
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
1 parent e3889c7 commit 8879858

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
from typing import Any, Pattern
1+
from typing import Any, Iterable, List, Pattern
22

33
from . import util
44

55
def build_preprocessors(md, **kwargs): ...
66

77
class Preprocessor(util.Processor):
8-
def run(self, lines) -> None: ...
8+
def run(self, lines: List[str]) -> List[str]: ...
99

1010
class NormalizeWhitespace(Preprocessor):
11-
def run(self, lines): ...
11+
def run(self, lines: Iterable[str]) -> List[str]: ...
1212

1313
class HtmlBlockPreprocessor(Preprocessor):
1414
right_tag_patterns: Any
@@ -17,10 +17,10 @@ class HtmlBlockPreprocessor(Preprocessor):
1717
attrs_re: Any
1818
left_tag_re: Any
1919
markdown_in_raw: bool = ...
20-
def run(self, lines): ...
20+
def run(self, lines: Iterable[str]) -> List[str]: ...
2121

2222
class ReferencePreprocessor(Preprocessor):
2323
TITLE: str = ...
2424
RE: Pattern
2525
TITLE_RE: Pattern
26-
def run(self, lines): ...
26+
def run(self, lines: List[str]) -> List[str]: ...

0 commit comments

Comments
 (0)