Skip to content

Conversation

miketheman
Copy link
Member

@miketheman miketheman commented Oct 3, 2025

Increase safety when working with these complex modules, while learning how they interoperate.

Precision (aka coverage) of warehouse.oidc:

When Precision Lines
Before (on rev 5dec3cd) 25.98% imprecise 3487 LOC
After 14.71% imprecise 3616 LOC

Measurement done via python -m mypy --html-report htmlcov -p warehouse.oidc and inspecting the generated output.

Lower imprecision == fewer ambiguities == good thing
Higher LOC == more lines covered == good thing

@miketheman miketheman added the testing Test infrastructure and individual tests label Oct 3, 2025
@miketheman miketheman force-pushed the miketheman/oidc-types branch from 82d80fc to ad628c1 Compare October 3, 2025 22:44
@miketheman
Copy link
Member Author

miketheman commented Oct 3, 2025

Almost ready, there's some more precision to add in warehouse.oidc.forms.*, warehouse.oidc.tasks - that's coming next.

Starting with `warehouse.oidc.interfaces`, apply hints where necessary,
and correct a few unchecked definitions.

Further commits will add more types to OIDC-related code to increase
safety and minimize errors while changing.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Working down the OIDC stack, adding hints to the services and utils
modules.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman miketheman force-pushed the miketheman/oidc-types branch from e07f9ab to 1d1ecf2 Compare October 6, 2025 14:40
@miketheman miketheman marked this pull request as ready for review October 6, 2025 14:41
@miketheman miketheman requested a review from a team as a code owner October 6, 2025 14:41
@miketheman miketheman merged commit 9cfbbf9 into pypi:main Oct 6, 2025
21 checks passed
@miketheman miketheman deleted the miketheman/oidc-types branch October 6, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Test infrastructure and individual tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants