Repository navigation
fix(abstractions): pass mypy --strict in the proxy factories and turn on strict for kiota_abstractions - #806
Merged
Vincent Biret (baywet) merged 2 commits intoOct 15, 2026
Conversation
… on strict for kiota_abstractions Annotate the callbacks in ParseNodeProxyFactory and SerializationWriterProxyFactory. ParseNodeProxyFactory took on_before and on_after as required callables but already skipped them when they were None, so they're Optional now, as in SerializationWriterProxyFactory. kiota_abstractions has no strict errors left, so its [tool.mypy] gets strict = true. Part of microsoft#722.
7 of 11 tasks
Contributor
Author
|
Maybe I should turn off automatic copilot AI review for my PRs.. 🤔 "Over quota limit" is basically useless |
Vincent Biret (baywet)
approved these changes
Oct 15, 2026
Vincent Biret (baywet)
enabled auto-merge
October 15, 2026 16:52
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Overview
Sixth item in #722. The serialization proxy factories now pass
mypy --strict, sokiota_abstractionshas no strict errors left and its[tool.mypy]getsstrict = true. CI keeps it there from now on.ParseNodeProxyFactorytypedon_beforeandon_afteras required callables, but it already skipped them when they wereNone. They'reOptionalnow, like inSerializationWriterProxyFactory. Callers that pass a callable see no change.Related Issue
Part of #722.
Testing Instructions
mypyinpackages/abstractionspasses, and it's a strict run now through the config. It also passes with--python-version 3.10and--python-version 3.14.yapf -dr kiota_abstractions,pylintandpytestpass inpackages/abstractions.mypystill passes inpackages/http/httpx,packages/bundle,packages/serialization/jsonandtests/validation.