Skip to content

fix pydantic - Strict types are not treated as strict mode #3543#3565

Open
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:3543
Open

fix pydantic - Strict types are not treated as strict mode #3543#3565
asukaminato0721 wants to merge 1 commit into
facebook:mainfrom
asukaminato0721:3543

Conversation

@asukaminato0721
Copy link
Copy Markdown
Contributor

@asukaminato0721 asukaminato0721 commented May 24, 2026

Summary

Fixes #3543

detects Pydantic Strict metadata on Annotated aliases like StrictInt, then carries that metadata into per-field strict flags, including assigned defaults.

Test Plan

add test

@github-actions
Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@asukaminato0721 asukaminato0721 marked this pull request as ready for review May 24, 2026 17:53
Copilot AI review requested due to automatic review settings May 24, 2026 17:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@asukaminato0721 asukaminato0721 changed the title fix fix pydantic - Strict types are not treated as strict mode #3543 May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pydantic - Strict types are not treated as strict mode

2 participants