Skip to content

[10/N] Apply ruff UP035 rule#165709

Closed
cyyever wants to merge 6 commits intopytorch:mainfrom
cyyever:up0352
Closed

[10/N] Apply ruff UP035 rule#165709
cyyever wants to merge 6 commits intopytorch:mainfrom
cyyever:up0352

Conversation

@cyyever
Copy link
Collaborator

@cyyever cyyever commented Oct 17, 2025

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 17, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 3032e41 with merge base e67e3d9 (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 marked this pull request as draft October 17, 2025 00:41
@facebook-github-bot facebook-github-bot added the module: rocm AMD GPU support for Pytorch label Oct 17, 2025
@cyyever cyyever force-pushed the up0352 branch 2 times, most recently from bc3f628 to 16643e8 Compare October 17, 2025 08:50
@cyyever cyyever changed the title Apply ruff UP035 rule [10/N] Apply ruff UP035 rule Oct 17, 2025
@cyyever cyyever marked this pull request as ready for review October 17, 2025 08:52
@cyyever cyyever requested a review from XuehaiPan as a code owner October 17, 2025 08:52
@cyyever cyyever marked this pull request as draft October 17, 2025 10:27
@Lucaskabela
Copy link
Contributor

Yeah this is why I wanted to make sure we could run the tests on the previous PR #165515 - sometimes reordering these imports can cause nontrivial/cascading changes.

Thats okay seems there are only 3 distinct test failures here that we can probably fix easily:

  1. test/functorch/test_control_flow.py::TestControlFlowTraced::test_cond_eager_run_with_item - seems after this PR there is 1 blank line not included; I think we can just run with the suggested EXPECTTEST_ACCEPT=1 flag locally to update the test here (but I would do the other fixes first to validate those don't cause these failures)

  2. test/test_testing.py::TestImports::test_circular_dependencies and test/test_public_bindings.py::TestPublicBindings::test_modules_can_be_imported seem the same error which comes from the changes to torch/testing/_internal/fake_config_module3.py - revert changes there and add some comment explaining why we can't reorder (causes circular import)

After that should be good so feel free to ping again :)

@cyyever cyyever force-pushed the up0352 branch 2 times, most recently from 78230d9 to 910d5e2 Compare October 24, 2025 08:38
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
@cyyever cyyever marked this pull request as ready for review October 24, 2025 10:59
@cyyever cyyever added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 24, 2025
@cyyever
Copy link
Collaborator Author

cyyever commented Oct 24, 2025

@Lucaskabela I have reverted some file changes because it's better to use a dedicated PR to fix them.

@cyyever
Copy link
Collaborator Author

cyyever commented Oct 25, 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

@cyyever cyyever deleted the up0352 branch October 25, 2025 00:39
meta-codesync bot pushed a commit to pytorch/benchmark that referenced this pull request Oct 25, 2025
Summary:
This is a follow-up of #165515. ruff `UP035` rules are applied to  dynamo code to use Py 3.10+ typing.

X-link: pytorch/pytorch#165709
Approved by: https://github.com/ezyang

Reviewed By: clee2000

Differential Revision: D85488738

fbshipit-source-id: 0e284a5faed4e6fde66cef35435a20d4ddfb432a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: compiled autograd compiled_autograd module: dynamo module: inductor module: rocm AMD GPU support for Pytorch oncall: distributed Add this issue/PR to distributed oncall triage queue open source release notes: distributed (c10d) release notes category release notes: inductor (aoti)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants