Skip to content

Commit 2c5c4d4

Browse files
committed
documentation and changelog
1 parent 2dfebb3 commit 2c5c4d4

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ This can also be enabled programmatically with `warnings.simplefilter('default',
1919
## [2.8.6] - Not released yet
2020
### Added
2121
* support for SVG `<linearGradient>` and `<radialGradient>` elements - _cf._ [issue #1580](https://github.com/py-pdf/fpdf2/issues/1580) - thanks to @Ani07-05
22+
* mypy and pyright checks in the CI pipeline to enforce strict typing
2223
### Fixed
2324
* the `A5` value that could be specified as page `format` to the `FPDF` constructor was slightly incorrect, and the corresponding page dimensions have been fixed. This could lead to a minor change in your documents dimensions if you used this `A5` page format. - _cf._ [issue #1699](https://github.com/py-pdf/fpdf2/issues/1699)
2425
* a bug when rendering empty tables with `INTERNAL` layout, that caused an extra border to be rendered due to an erroneous use of `list.index()` - _cf._ [issue #1669](https://github.com/py-pdf/fpdf2/issues/1669)
2526
### Changed
2627
* improved performance when rendering paths, SVGs, and opaque raster images with an alpha channel - _cf._ [PR #1675](https://github.com/py-pdf/fpdf2/pull/1675)
28+
* typing annotations added across the codebase as part of the strict typing rollout
2729

2830
## [2.8.5] - 2025-10-29
2931
### Added

docs/Development.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ In case of special "false positive" cases,
9393
checks can be disabled locally with `#pylint disable=XXX` code comments,
9494
or globally through the `.pylintrc` file.
9595

96+
## Static typing
97+
Strict typing is enforced in CI with `mypy` and `pyright` (see `pyproject.toml`). Run them locally before pushing, or enable the pre-commit hook so they run automatically:
98+
```
99+
pip install fpdf2[dev]
100+
mypy
101+
pyright
102+
```
103+
104+
General guidelines:
105+
- Use `# type: ignore[...]` sparingly
106+
- Prefer real types over `Any`
107+
- Keep casts to unavoidable spots
108+
96109
## Pre-commit hook
97110
This project uses `git` **pre-commit hooks**: https://pre-commit.com
98111

0 commit comments

Comments
 (0)