Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable and revert unpacked-list-comprehension (UP027) #4558

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Aug 12, 2024

Summary of changes

In astral-sh/ruff#12754 it was found that the original pyupgrade rule unpacked-list-comprehension (UP027) is based on lacks justification and is actually slower in cases relevant to unpacking (ie: small sizes). The rule is deprecated in astral-sh/ruff#12843 for Ruff 0.6

This PR disables the rule now before there's any usage of it. I also searched for ,.*? = \( to find any code that would've triggered it and revert.

Pull Request Checklist

@Avasam Avasam force-pushed the disable-UP027 branch 2 times, most recently from 27bf87d to 42a5eee Compare August 12, 2024 12:40
self.warn,
"Couldn't find index page for %r (maybe misspelled?)",
)
meth, msg = self.warn, "Couldn't find index page for %r (maybe misspelled?)"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not strictly related to unpacked-list-comprehension (UP027), but I found this whilst looking for ,.*? = \( so I figured I might make it cleaner too whilst I saw it.

@abravalheri abravalheri merged commit 953057d into pypa:main Oct 21, 2024
22 checks passed
@abravalheri
Copy link
Contributor

Thank you very much.

@Avasam Avasam deleted the disable-UP027 branch October 21, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants