Skip to content

fix(backends): make parsed data and model contracts explicit - #4557

Merged
PeterStaar-IBM merged 3 commits into
2026-10-04-fix/explicit-overridesfrom
2026-10-04-fix/python-type-contracts
Oct 5, 2026
Merged

PeterStaar-IBM merged 3 commits into
2026-10-04-fix/explicit-overridesfrom
2026-10-04-fix/python-type-contracts

Conversation

@geoHeil

@geoHeil geoHeil commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

New ty finds incomplete or incorrect backend contracts for parsed values, backend options, document nodes, and third-party APIs.

State the actual types and narrow parsed values where they enter the backend. Keep supported conversion behavior and public Python 3.10 compatibility. Remove ineffective ignores and impossible branches. The ODS image pass also calls a method that does not exist in odfdo, which drops floating images. Use the existing image loader and leave cell images with their rich cell, so each picture has one owner.

Validation: ty 0.0.84 passes for all backend files on Python 3.10 and 3.13. The old ty 0.0.33 check exits successfully. make validate passes. Focused tests cover the source, stored document tree, and exported output. Two new ODS cases check image pixels, ownership, and HTML embedding. No reference data was changed.

Five line-local notes cover verified dependency stub limits: four openpyxl private fields and Pillow read-only streams. No type rule is disabled.

@geoHeil

geoHeil commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor Author

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

✅ DCO Check Passed

Thanks @geoHeil, all your commits are properly signed off. 🎉

Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
@geoHeil
geoHeil force-pushed the 2026-10-04-fix/python-type-contracts branch from 31c74b9 to bd9060c Compare October 4, 2026 09:30
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
@geoHeil
geoHeil added this pull request to stack #4562 October 4, 2026 10:29
@PeterStaar-IBM
PeterStaar-IBM merged commit e4e4d5e into 2026-10-04-docs/review-guardrails Oct 5, 2026
26 checks passed
@PeterStaar-IBM
PeterStaar-IBM deleted the 2026-10-04-fix/python-type-contracts branch October 5, 2026 04:56
PeterStaar-IBM pushed a commit that referenced this pull request Oct 5, 2026
* fix(backends): make parsed data and model contracts explicit

Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>

* fix(html): preserve invalid option failure contract

Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>

* fix(html): preserve invalid option failure contract

Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>

---------

Signed-off-by: Georg Heiler <georg.kf.heiler@gmail.com>
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