Skip to content

[1/N] Apply UP035 rule in tests#163947

Closed
cyyever wants to merge 1 commit intopytorch:mainfrom
cyyever:test_upgrade
Closed

[1/N] Apply UP035 rule in tests#163947
cyyever wants to merge 1 commit intopytorch:mainfrom
cyyever:test_upgrade

Conversation

@cyyever
Copy link
Collaborator

@cyyever cyyever commented Sep 26, 2025

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 26, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 05aad9f with merge base 1cc9263 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@cyyever cyyever changed the title Import Callable from collections.abc in tests Apply UP035 ruff rule in tests Sep 26, 2025
@cyyever cyyever changed the title Apply UP035 ruff rule in tests Apply UP035 rule in tests Sep 26, 2025
@cyyever cyyever force-pushed the test_upgrade branch 3 times, most recently from db474a7 to 0c8b627 Compare September 26, 2025 10:53
@cyyever cyyever requested a review from Skylion007 September 26, 2025 11:18
@cyyever cyyever added the ciflow/trunk Trigger trunk jobs on your pull request label Sep 26, 2025
@Skylion007
Copy link
Collaborator

Skylion007 commented Sep 27, 2025

Some of these tests are explicitly to check that tracing through typing import Tuple and tuple typing work, if I recall it's some of the files that already import / use both. I'd be more comfortable applying this change on the root torch folder than the tests to start.

@cyyever
Copy link
Collaborator Author

cyyever commented Sep 28, 2025

@Skylion007 I have the same concern, let me revert the changes of fx and dynamo files.

@cyyever cyyever changed the title Apply UP035 rule in tests [1/N] Apply UP035 rule in tests Sep 28, 2025
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
@cyyever
Copy link
Collaborator Author

cyyever commented Sep 29, 2025

@pytorchbot merge

@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

pytorchmergebot pushed a commit that referenced this pull request Sep 29, 2025
This is the result of applying the ruff `UP035` check.
`Callable` is imported from `collections.abc` instead of `typing`.
`TypeAlias` is also imported from `typing`.
This PR is the follow-up of #163947.

Pull Request resolved: #164054
Approved by: https://github.com/ezyang, https://github.com/Skylion007
jainapurva pushed a commit that referenced this pull request Sep 29, 2025
Apply UP035 `ruff` rule in tests, but some tests for `fx` and `dynamo` are excluded in case the old typing is the test target.

Pull Request resolved: #163947
Approved by: https://github.com/ezyang
maggiemoss pushed a commit to maggiemoss/pytorch that referenced this pull request Sep 29, 2025
Apply UP035 `ruff` rule in tests, but some tests for `fx` and `dynamo` are excluded in case the old typing is the test target.

Pull Request resolved: pytorch#163947
Approved by: https://github.com/ezyang
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.

7 participants