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 --skip-magic-trailing-comma to formatter dev comment #8689

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

konstin
Copy link
Member

@konstin konstin commented Nov 15, 2023

Testing the compatibility with the future stable black style, i realized the ruff_python_formatter dev main was lacking the --skip-magic-trailing-comma option. This does not affect ruff format.

Usage:

cargo run --bin ruff_python_formatter -p ruff_python_formatter -- --skip-magic-trailing-comma --emit stdout scratch.py

Testing the compatibility with the future stable black style, i realized the `ruff_python_formatter`
dev main was lacking the `--skip-magic-trailing-comma` option.

Usage:
```shell
cargo run --bin ruff_python_formatter -p ruff_python_formatter -- --skip-magic-trailing-comma --emit stdout scratch.py
```
@konstin konstin marked this pull request as ready for review November 15, 2023 09:19
@konstin konstin enabled auto-merge (squash) November 15, 2023 09:19
@konstin konstin merged commit a783b14 into main Nov 15, 2023
16 checks passed
@konstin konstin deleted the skip_magic_trailing_comma-in-dev-command branch November 15, 2023 09:23
Copy link
Contributor

ruff-ecosystem results

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@Apreche
Copy link

Apreche commented Nov 15, 2023

Right now whenever I run ruff format with version 0.1.5, it's behaving as if skip_magic_trailing_comma = true even though the default is supposed to be false. It's really annoying to put in a bunch of newlines and then have them blown away to make one long line.

Does this fix that issue?

@charliermarsh
Copy link
Member

@Apreche - This is just an internal development command for Ruff so it shouldn't affect your production setup. Can you give an example of code that's being reformatted?

@Apreche
Copy link

Apreche commented Nov 16, 2023

I investigated, and it was my mistake. No issues. Sorry about that.

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