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

Enable Ruff FURB #13310

Merged
merged 4 commits into from
Jan 2, 2025
Merged

Enable Ruff FURB #13310

merged 4 commits into from
Jan 2, 2025

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Dec 26, 2024

Ref #13295
https://docs.astral.sh/ruff/rules/#refurb-furb

A single autofixable change. Otherwise we already pass all refurb rules.
Although a lot of those rules are still in preview.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

This change seems fine but if more rules make it out of Ruff's preview we'll have to evaluate whether we still want them.

@Avasam
Copy link
Collaborator Author

Avasam commented Dec 28, 2024

There's no harm on waiting on this one for Ruff 0.9 or running it in preview mode to see what it affects.
I vaguely remember there's a rule about preferring Path that is raised.

@AlexWaygood
Copy link
Member

Some of the refurb rules in preview have been in preview for quite a while now. The reason is that they're extremely opinionated rules that I expect a significant portion of Ruff's users would disagree with. These rules can't realistically be stabilised until we've figured out a better way of signalling that a certain rule makes highly opinionated recommendations, which probably requires astral-sh/ruff#1774.

I'd recommend for typeshed to just select the rules it finds useful from this category, rather than the whole category, in case Ruff's policy here changes and we end up stabilising some of these very opinionated rules that make debatable recommendations.

pyproject.toml Outdated Show resolved Hide resolved
@AlexWaygood AlexWaygood merged commit 67568b5 into python:main Jan 2, 2025
46 checks passed
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.

3 participants