Skip to content

Comments

Fix a few typing issues#1757

Merged
andersonhc merged 4 commits intopy-pdf:masterfrom
srittau:typing-fixes
Feb 22, 2026
Merged

Fix a few typing issues#1757
andersonhc merged 4 commits intopy-pdf:masterfrom
srittau:typing-fixes

Conversation

@srittau
Copy link

@srittau srittau commented Feb 20, 2026

These are a few random type fixes for issues encountered in my projects when migrating from types-fpdf2 to fpdf2 2.8.6:

  • Type FPDF.title correctly.
  • Allow paths as fname argument to FPDF.add_font().
  • Use overloads for return type of FPDF.output().

Checklist:

  • A unit test is covering the code added / modified by this PR N/A

  • In case of a new feature, docstrings have been added, with also some documentation in the docs/ folder N/A

  • A mention of the change is present in CHANGELOG.md
    Not done yet. I assume there will be more type fixes before the next release, so maybe it's best if the maintainers write a summary? Otherwise, I can add an entry, if desired.

  • This PR is ready to be merged

By submitting this pull request, I confirm that my contribution is made under the terms of the GNU LGPL 3.0 license.

* Type `FPDF.title` correctly.
* Allow paths as `fname` argument to `FPDF.add_font()`.
* Use overloads for return type of `FPDF.output()`.
Copy link
Collaborator

@andersonhc andersonhc left a comment

Choose a reason for hiding this comment

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

Can you please add an entry on changelog.md?

srittau and others added 2 commits February 21, 2026 16:09
Co-authored-by: Anderson Herzogenrath da Costa <andersonhc@gmail.com>
Added various type fixes including annotations and overloads.
@srittau
Copy link
Author

srittau commented Feb 21, 2026

Can you please add an entry on changelog.md?

Done. I've used a second level of indentations, which hasn't been done before in the Changelog. Please let me know if I should flatten it or just merge the various entries into one.

Co-authored-by: Anderson Herzogenrath da Costa <andersonhc@gmail.com>
@andersonhc
Copy link
Collaborator

@allcontributors please add @srittau for code

@allcontributors
Copy link

@andersonhc

I've put up a pull request to add @srittau! 🎉

@andersonhc andersonhc merged commit 11289c3 into py-pdf:master Feb 22, 2026
23 checks passed
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.

2 participants