Skip to content

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
@hauntsaninja hauntsaninja deleted the md branch September 25, 2020 20:37
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