[weasyprint] Add stubs for WeasyPrint 69.0#15349
Conversation
This comment has been minimized.
This comment has been minimized.
Yes, that's perfectly fine. |
|
Thanks for the quick reply! Then I will see to it that at least my use case is completely mapped (and the checks run green, I suppose), and would then change this PR to ready. |
|
Well, I haven't forgotten about this, and funnily enough, today the organisation behind WeasyPrint sort of doubled down on the fact they don't like type hints: https://www.courtbouillon.org/blog/00064-types/ Meaning this PR could become very relevant if I ever get the time to implement something, which I still hope I do soon-ish. |
|
Hi! WeasyPrint has a pretty stable, official public API. All the other functions are not supposed to be used by WeasyPrint users, and regularly break between versions. I don’t know what the best solution is in this case, but I think that adding type hints only for this public API is probably easier and better. |
|
That would also be sufficient for me. The current state of this PR is auto-generated, by the tool provided in the Typeshed repo. Does that mean I could remove a lot of the current files, and only include those corresponding to the Python files containing the public API? |
I think so. |
This comment has been minimized.
This comment has been minimized.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
|
A hint to maybe help this get over the finish line: I've just opened #16011 to add some guidance about missing dependencies. For your convenience, I've copied it here: When a third-party stub package depends on another package, there are several
|
This adds a really small set of annotations for WeasyPrint 68.0.
I use WeasyPrint in one of my projects, use only a few methods, but would like to have my type checker working for these.
Is it okay if a submit this to typeshed, even though it will be only partially annotated?