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

Replace isort with Ruff #325

Merged
merged 1 commit into from
Nov 6, 2024
Merged

Conversation

Avasam
Copy link
Contributor

@Avasam Avasam commented Nov 6, 2024

Much faster and brings the configs closer to typeshed's

combine_as_imports = true
line_length = 130
extra_standard_library = [
[tool.ruff]
Copy link
Contributor

Choose a reason for hiding this comment

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

If we're going to use ruff for linting, why not replace black and use ruff for formatting also?

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's do that in a separate PR I guess, since it may cause a lot of noise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My reasoning was that typeshed (which is the endgoal for these stubs if not upstreamed to first-party) still uses black (for historical collaboration reasons, see python/typeshed#11734).

That being said, a formatter run is really easy and any difference would quickly be resolved when upstreaming, so if you wanna go Ruff for formatting, I'm happy to open a PR for it as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't feel strongly about switching to ruff for formatting. We can do it later if someone is inspired.

FWIW, I don't think "typeshed uses it" is a reason to stick with black since if we push something to typeshed it's trivial to run black on it at that time.

@debonte debonte merged commit 62181ec into microsoft:main Nov 6, 2024
3 checks passed
@Avasam Avasam deleted the replace-isort-with-Ruff branch November 6, 2024 20:17
@Avasam Avasam mentioned this pull request Nov 6, 2024
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