Skip to content

[BE] Ensure generated stub files by gen_pyi are properly formatted#150730

Closed
XuehaiPan wants to merge 27 commits intogh/XuehaiPan/267/basefrom
gh/XuehaiPan/267/head
Closed

[BE] Ensure generated stub files by gen_pyi are properly formatted#150730
XuehaiPan wants to merge 27 commits intogh/XuehaiPan/267/basefrom
gh/XuehaiPan/267/head

Conversation

@XuehaiPan
Copy link
Collaborator

@XuehaiPan XuehaiPan commented Apr 5, 2025

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Apr 5, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/150730

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit 08cb6a3 with merge base 9b2a45a (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Rebased gh/XuehaiPan/269/orig onto refs/remotes/origin/viable/strict because #150732 was rebased, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/150730)

XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Apr 7, 2025
[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Rebased gh/XuehaiPan/269/orig onto refs/remotes/origin/viable/strict because #150732 was rebased, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/150730)

@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #150732

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Apr 14, 2025
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 10, 2025
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 14, 2025
[ghstack-poisoned]
if name.startswith("i"):
# In-place binary-operation dunder methods, like `__iadd__`, should return `Self`
return [
f"def {opname}(self, other: Tensor | Number | _complex) -> Tensor: ... # noqa: PYI034"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not return Self? BC or doesn't match actual behavior?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It does not match the actual behavior because the in-place operation might promote the dtype.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 16, 2025
[ghstack-poisoned]
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 17, 2025
@XuehaiPan
Copy link
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label May 17, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request May 17, 2025
@github-actions github-actions bot deleted the gh/XuehaiPan/267/head branch June 19, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

better-engineering Relatively self-contained tasks for better engineering contributors ciflow/trunk Trigger trunk jobs on your pull request Merged open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants