-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Contributed stubs for markdown package #4426
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
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.
Thanks! This is also missing init.pyi, which a) seems to cause mypy to not find these stubs, b) you'll want to import Markdown, markdown and markdownFromFile as per https://github.com/Python-Markdown/markdown/blob/370e17b3923d7d8f4709652bc24b695271a0210d/markdown/__init__.py#L38
Also CI says isort is unhappy
class Markdown: | ||
def __init__( | ||
self, | ||
extensions: Optional[Sequence[Union[str, Extension]]] = ..., |
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
|
||
def markdown( | ||
text: Text, | ||
extensions: Optional[Sequence[Union[str, Extension]]] = ..., |
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.
extensions and on should be keyword only
tab_length: Optional[int] = ..., | ||
) -> Text: ... | ||
def markdownFromFile( | ||
input: Optional[Union[str, TextIO, BinaryIO]] = ..., |
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.
all of these should also be keyword only
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.
Awesome, thanks!
No description provided.