-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update mistune to more recent version (#619)
* gitignore ./mypy_cache, .coverage, coverage.xml,pydocstyle_report.txt * fix mypy-stubs for mistune * use mypy.ini to share enable_recursive_aliases between mypy and mypyc calls * split pyproject.toml build-system requirements multi-line for better readability * add mistune pre-hook to handle problematic markdown lists (relates to lepture/mistune#296) * add tests for expected schema-salad-doc output * add make utilities to compute new hash and check html diff * fix missing newline in code sample & update metaschema-pre.yml with extra newline * align mismatchign mypy-requirements.txt / pyproject.toml mypy version * normalize use of get_data() in tests Co-authored-by: Michael R. Crusoe <1330696+mr-c@users.noreply.github.com>
- Loading branch information
1 parent
567665f
commit 4733227
Showing
26 changed files
with
1,052 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
.coverage | ||
coverage.xml | ||
pydocstyle_report.txt | ||
.tox/ | ||
.eggs/ | ||
.vscode/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from typing import Iterable, Optional, Union | ||
|
||
from mistune._types import * | ||
from mistune.inline_parser import RendererT | ||
from mistune.markdown import Markdown, ParseHook, RenderHook | ||
from mistune.plugins import Plugin, PluginName | ||
from mistune.renderers import BaseRenderer, DataT, HTMLRenderer, HTMLType | ||
from typing_extensions import Literal | ||
|
||
html: Markdown[HTMLType, HTMLRenderer] | ||
|
||
RendererRef = Union[Literal["html", "ast"], BaseRenderer[DataT]] | ||
PluginRef = Union[PluginName, Plugin] # reference to register a plugin | ||
|
||
def create_markdown( | ||
escape: bool = False, | ||
hard_wrap: bool = False, | ||
renderer: Optional[RendererRef[DataT]] = None, | ||
plugins: Optional[Iterable[PluginRef]] = None, | ||
) -> Markdown[DataT, RendererT]: ... | ||
def markdown( | ||
text: str, | ||
escape: bool = True, | ||
renderer: Optional[BaseRenderer[DataT]] = None, | ||
plugins: Optional[Iterable[PluginRef]] = None, | ||
) -> str: ... | ||
|
||
__version__: str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from typing import Any, Dict, List | ||
|
||
# type aliases shared across modules | ||
State = Dict[str, Any] # extra options that work with a given 'ParsedType' | ||
Tokens = List[str] |
Oops, something went wrong.