Skip to content
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

markdown: add more stubs #4574

Merged
merged 7 commits into from
Sep 25, 2020
Merged

markdown: add more stubs #4574

merged 7 commits into from
Sep 25, 2020

Conversation

hauntsaninja
Copy link
Collaborator

We recently accepted #4426 which contributed some stubs to markdown. However, the stubs weren't complete, which results in false positives (eg, when type checking https://github.com/zulip/zulip).
Here are the rest of the stubs, as generated by stubgen --export-less -p markdown. I added some type ignores (where the library breaks LSP) and removed Any type annotations so it's clearer that the annotations aren't done.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start, hopefully we can eventually get rid of the Anys.

def run(self, parent, blocks) -> None: ...

class BlockQuoteProcessor(BlockProcessor):
RE: Any
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is a Pattern?

Copy link
Collaborator Author

@hauntsaninja hauntsaninja Sep 25, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the changes. Not all of them are Pattern, see 8f2c0c5

hauntsaninja added 2 commits September 25, 2020 12:28
I ran `fastmod 'RE: Any$' 'RE: Pattern'`. I then fixed the imports. Then
I ran stubtest, which complained about a couple of those substitutions
(stubgen will also type as Any if something is a str expression or
alias).
@srittau srittau merged commit cb6549f into python:master Sep 25, 2020
This was referenced Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants