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

Add a dedicated 'Ruff: Format document' action #252

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

charliermarsh
Copy link
Member

Summary

We have this for lint fixing and import sorting. It seems consistent to have one for formatting too.

@charliermarsh charliermarsh merged commit 160e936 into main Sep 27, 2023
18 checks passed
@charliermarsh charliermarsh deleted the charlie/format-action branch September 27, 2023 03:35
@MichaReiser
Copy link
Member

Hmm, not sure how I feel about that. I see the consistency but I'm not aware that any other formatter exposes such a command. What's the use case for it?

@charliermarsh
Copy link
Member Author

I guess the dedicated "Ruff: Fix all" is nice if you want to run just the Ruff fixes (as opposed to the generic "Fix all"). Perhaps there isn't really a use-case here for the formatter, apart from testing? Being able to run it without configuring it as your default formatter?

@MichaReiser
Copy link
Member

Yeah, the fix all makes sense (does ruff has it's own ruff.fixAll quick fix?

@charliermarsh
Copy link
Member Author

Yeah, it defines a custom action in the VS Code client that triggers the server command defined in the LSP.

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