Skip to content

[BE]: ruff PLC0207 - use maxsplit kwarg#160107

Closed
Skylion007 wants to merge 1 commit intopytorch:mainfrom
Skylion007:skylion007/ruff-apply-PLC0207-2025-08-07
Closed

[BE]: ruff PLC0207 - use maxsplit kwarg#160107
Skylion007 wants to merge 1 commit intopytorch:mainfrom
Skylion007:skylion007/ruff-apply-PLC0207-2025-08-07

Conversation

@Skylion007
Copy link
Collaborator

@Skylion007 Skylion007 commented Aug 7, 2025

Automatically replaces split with rsplit when relevant and only performs the split up to the first ( or last value). This allows early return of the split function and improve efficiency.

cc @ezyang @SherlockNoMad @EikanWang @jgong5 @wenzhe-nrv @voznesenskym @penguinwu @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @jiayisunx @ipiszy @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben

@Skylion007 Skylion007 requested review from albanD and ezyang August 7, 2025 16:56
@Skylion007 Skylion007 requested review from a team, justinchuby and titaiwangms as code owners August 7, 2025 16:56
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 7, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit d02a385 with merge base b1a6027 (image):

NEW FAILURE - The following job has failed:

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

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

Thx!

@Skylion007 Skylion007 force-pushed the skylion007/ruff-apply-PLC0207-2025-08-07 branch from 8d3e759 to d02a385 Compare August 7, 2025 23:37
@Skylion007
Copy link
Collaborator Author

@pytorchbot merge -i

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 7, 2025
@Skylion007 Skylion007 added the better-engineering Relatively self-contained tasks for better engineering contributors label Aug 7, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 1 checks: Validate Runner Determinator Script is in Sync / check-runner-determinator

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

hinriksnaer pushed a commit to hinriksnaer/pytorch that referenced this pull request Aug 8, 2025
Automatically replaces split with rsplit when relevant and only performs the split up to the first ( or last value). This allows early return of the split function and improve efficiency.

Pull Request resolved: pytorch#160107
Approved by: https://github.com/albanD
markc-614 pushed a commit to markc-614/pytorch that referenced this pull request Sep 17, 2025
Automatically replaces split with rsplit when relevant and only performs the split up to the first ( or last value). This allows early return of the split function and improve efficiency.

Pull Request resolved: pytorch#160107
Approved by: https://github.com/albanD
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/inductor ciflow/trunk Trigger trunk jobs on your pull request fx Merged module: inductor open source release notes: releng release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants