-
Notifications
You must be signed in to change notification settings - Fork 329
Description
Over the last few years, type hints have become a foundation of modern Python development. Strong typing provides several benefits like detecting bugs earlier, improving editor/IDE support, and enabling safer refactoring.
With the rise of AI-based coding tools, high-quality type hints significantly improve the accuracy of auto-generated code and reduce errors. A strictly typed fpdf2 will greatly helps our users and AI models to use the API correctly.
As more projects adopt strict typing, fpdf2 is increasingly becoming a "typed gap" in otherwise well-typed codebases.
Community efforts like [types-fpdf2](https://pypi.org/project/types-fpdf2) exist to fill the typing gap, but maintaining them is difficult. fpdf2 evolves quickly, often with many changes per release, and stub updates lag behind (e.g., 2.8.5 stubs have not yet been published).
To address all of this, I am working on a big refactor of the fpdf2 codebase to make it strict typed and adding mypy into our CI pipeline.
This issue is mainly for visibility and discussion.
Feedback, suggestions, and concerns are welcome!