Skip to content

Conversation

@mschoettle
Copy link
Contributor

@mschoettle mschoettle commented Oct 26, 2023

Release Notes: https://github.com/py-pdf/fpdf2/blob/master/CHANGELOG.md#276---2023-10-11

Changes txt to text and brings all the other stubs up to date.

I am wondering whether it would be better to add text as an additional argument instead?

This PR currently only covers what's listed in the "Deprecated" section of the release notes. It does not cover the new method text_columns (https://py-pdf.github.io/fpdf2/TextColumns.html). Let me know if this should be added as well at the same time.

Closes #10609

@mschoettle
Copy link
Contributor Author

The pipeline answered the above question for me :)

@github-actions

This comment has been minimized.

@mschoettle mschoettle marked this pull request as draft October 27, 2023 14:12
@github-actions

This comment has been minimized.

@AlexWaygood
Copy link
Member

For entirely new modules which are missing from the stub, mypy's stubgen tool can be pretty useful for generating baseline stubs

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@mschoettle mschoettle marked this pull request as ready for review November 2, 2023 02:14
@mschoettle
Copy link
Contributor Author

I completed bringing the stubs up to date with v2.7.6. I used mypy's stubgen tool and compared the two versions. There's one place where I replaced Number first with int | float and then float due to a violation. I left a TODO there.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks! A few things I noticed below.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@mschoettle mschoettle requested a review from srittau November 13, 2023 17:04
@github-actions

This comment has been minimized.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

@mschoettle Just using float seems to work fine. I suggest we don't use Number.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@srittau srittau merged commit dc4594a into python:main Nov 15, 2023
@mschoettle mschoettle deleted the fpdf-2.7.6 branch November 15, 2023 14:16
@mschoettle
Copy link
Contributor Author

@srittau Thanks a lot for fixing the weird Number issue!

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