Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.1k
Contributed stubs for markdown package#4426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from .core import Markdown as Markdown, markdown as markdown, markdownFromFile as markdownFromFile |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| from typing import BinaryIO, Mapping, Optional, Sequence, Text, TextIO, Union | ||
| from typing_extensions import Literal | ||
| from .extensions import Extension | ||
| class Markdown: | ||
| def __init__( | ||
| self, | ||
| *, | ||
| extensions: Optional[Sequence[Union[str, Extension]]] = ..., | ||
| extension_configs: Optional[Mapping[str, Mapping[str, str]]] = ..., | ||
| output_format: Optional[Literal["xhtml", "html"]] = ..., | ||
| tab_length: Optional[int] = ..., | ||
| ) -> None: ... | ||
| def build_parser(self) -> Markdown: ... | ||
| def registerExtensions( | ||
| self, extensions: Sequence[Union[Extension, str]], configs: Mapping[str, Mapping[str, str]] | ||
| ) -> Markdown: ... | ||
| def build_extension(self, ext_name: Text, configs: Mapping[str, str]) -> Extension: ... | ||
| def registerExtension(self, extension: Extension) -> Markdown: ... | ||
| def reset(self: Markdown) -> Markdown: ... | ||
| def set_output_format(self, format: Literal["xhtml", "html"]) -> Markdown: ... | ||
| def is_block_level(self, tag: str) -> bool: ... | ||
| def convert(self, source: Text) -> Text: ... | ||
| def convertFile( | ||
| self, | ||
| input: Optional[Union[str, TextIO, BinaryIO]] = ..., | ||
| output: Optional[Union[str, TextIO, BinaryIO]] = ..., | ||
| encoding: Optional[str] = ..., | ||
| ) -> Markdown: ... | ||
| def markdown( | ||
| text: Text, | ||
| *, | ||
| extensions: Optional[Sequence[Union[str, Extension]]] = ..., | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extensions and on should be keyword only | ||
| extension_configs: Optional[Mapping[str, Mapping[str, str]]] = ..., | ||
| output_format: Optional[Literal["xhtml", "html"]] = ..., | ||
| tab_length: Optional[int] = ..., | ||
| ) -> Text: ... | ||
| def markdownFromFile( | ||
| *, | ||
| input: Optional[Union[str, TextIO, BinaryIO]] = ..., | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. all of these should also be keyword only | ||
| output: Optional[Union[str, TextIO, BinaryIO]] = ..., | ||
| encoding: Optional[str] = ..., | ||
| extensions: Optional[Sequence[Union[str, Extension]]] = ..., | ||
| extension_configs: Optional[Mapping[str, Mapping[str, str]]] = ..., | ||
| output_format: Optional[Literal["xhtml", "html"]] = ..., | ||
| tab_length: Optional[int] = ..., | ||
| ) -> None: ... | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| from typing import Mapping, Sequence | ||
| from ..core import Markdown | ||
| class Extension: | ||
| config: Mapping[str, str] = ... | ||
| def __init__(self, **kwargs: Mapping[str, str]) -> None: ... | ||
| def getConfig(self, key: str, default: str = ...) -> str: ... | ||
| def getConfigs(self) -> Mapping[str, str]: ... | ||
| def getConfigInfo(self) -> Sequence[Mapping[str, str]]: ... | ||
| def setConfig(self, key: str, value: str) -> None: ... | ||
| def setConfigs(self, items: Mapping[str, str]) -> None: ... | ||
| def extendMarkdown(self, md: Markdown) -> None: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should be marked as keyword-only