Skip to content

fix(stubgen): preserve from __future__ import annotations - #5369

Closed
mangeshraut712 wants to merge 2 commits into
meta:mainfrom
mangeshraut712:fix/stubgen-preserve-future-annotations
Closed

mangeshraut712 wants to merge 2 commits into
meta:mainfrom
mangeshraut712:fix/stubgen-preserve-future-annotations

Conversation

@mangeshraut712

Copy link
Copy Markdown
Contributor

Closes #5321.

Keep copied __future__ imports at the top of generated stubs so added typing imports do not make them invalid Python.
@meta-codesync

meta-codesync Bot commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D127483012. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions

This comment has been minimized.

@github-actions github-actions Bot added size/s and removed size/s labels Oct 26, 2026
@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. ✅

@stroxler stroxler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@meta-codesync meta-codesync Bot closed this in f819cf2 Oct 26, 2026
@meta-codesync meta-codesync Bot added the Merged label Oct 26, 2026
@meta-codesync

meta-codesync Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

This pull request has been merged in f819cf2.

@mangeshraut712

Copy link
Copy Markdown
Contributor Author

Hey — CodeSync landed this on main with me as the commit author (thanks). GitHub still shows the PR as closed not merged (mergedAt is null), so it does not show up in is:merged search or contributor merge counts.

Could you mark CodeSync landings as merged on the GitHub side (or reopen + merge via GitHub) so external contributors get the PR merge credit? Same issue on #5365 #5373 #5367 #5369.

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.

bug(stubgen): typing / _typeshed imports are emitted above from __future__ import annotations

2 participants