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

Allow # fmt: skip with interspersed same-line comments #9395

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jan 5, 2024

Summary

This is similar to #8876, but more limited in scope:

  1. It only applies to # fmt: skip (like Black). Like # isort: on, # fmt: on needs to be on its own line (still).
  2. It only delimits on #, so you can do # fmt: skip # noqa, but not # fmt: skip - some other content or # fmt: skip; noqa.

If we want to support the ;-delimited version, we should revisit later, since we don't support that in the linter (so # fmt: skip; noqa wouldn't register a noqa).

Closes #8892.

@charliermarsh charliermarsh marked this pull request as ready for review January 5, 2024 00:18
@charliermarsh charliermarsh added the formatter Related to the formatter label Jan 5, 2024
Copy link
Contributor

github-actions bot commented Jan 5, 2024

ruff-ecosystem results

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@charliermarsh charliermarsh merged commit 60ba7a7 into main Jan 5, 2024
17 checks passed
@charliermarsh charliermarsh deleted the charlie/skip branch January 5, 2024 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Related to the formatter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Formatter: single_line_format_skip_with_multiple_comments preview style
2 participants