Skip to content

fix(abstractions): pass mypy --strict in the proxy factories and turn on strict for kiota_abstractions - #806

Merged
Vincent Biret (baywet) merged 2 commits into
microsoft:mainfrom
HardMax71:fix/strict-typing-proxy-factories
Oct 15, 2026
Merged

Vincent Biret (baywet) merged 2 commits into
microsoft:mainfrom
HardMax71:fix/strict-typing-proxy-factories

Conversation

@HardMax71

Copy link
Copy Markdown
Contributor

Overview

Sixth item in #722. The serialization proxy factories now pass mypy --strict, so kiota_abstractions has no strict errors left and its [tool.mypy] gets strict = true. CI keeps it there from now on.

ParseNodeProxyFactory typed on_before and on_after as required callables, but it already skipped them when they were None. They're Optional now, like in SerializationWriterProxyFactory. Callers that pass a callable see no change.

Related Issue

Part of #722.

Testing Instructions

  • mypy in packages/abstractions passes, and it's a strict run now through the config. It also passes with --python-version 3.10 and --python-version 3.14.
  • yapf -dr kiota_abstractions, pylint and pytest pass in packages/abstractions.
  • mypy still passes in packages/http/httpx, packages/bundle, packages/serialization/json and tests/validation.

… 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.
@HardMax71
Max Azatian (HardMax71) requested a review from a team as a code owner October 15, 2026 15:58
Copilot AI balanced review requested due to automatic review settings October 15, 2026 15:58

This comment was marked as off-topic.

@HardMax71

Max Azatian (HardMax71) commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Maybe I should turn off automatic copilot AI review for my PRs.. 🤔

"Over quota limit" is basically useless

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The annotations align with existing callback contracts and preserve runtime behavior, with no blocking issues identified.

0 open findings

🧠 Review effort: Balanced

@github-project-automation github-project-automation Bot moved this to In Progress 🚧 in Kiota Oct 15, 2026
Copilot AI balanced review requested due to automatic review settings October 15, 2026 16:52

This comment was marked as off-topic.

@sonarqubecloud

Copy link
Copy Markdown

@baywet
Vincent Biret (baywet) merged commit 511be47 into microsoft:main Oct 15, 2026
122 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress 🚧 to Done ✔️ in Kiota Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done ✔️

Development

Successfully merging this pull request may close these issues.

3 participants