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

[Docs] Clear instruction for single quotes (linter and formatter) #12015

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jackdesert
Copy link

Summary

In order to use single quotes with both the ruff linter and the ruff formatter,
two different rules must be applied. This was not clear to me when
internet searching "configure ruff single quotes" and it eventually
I filed this issue:

#12003

Test Plan

Please advise how to preview this documentation change.

@@ -196,6 +196,8 @@ As an example, the following would configure Ruff to:

[tool.ruff.format]
# 5. Use single quotes for non-triple-quoted strings.
# (Note this only applies to the ruff formatter. To configure
# the ruff linter to also use single quotes, see [tool.ruff.lint.flake8-quotes])
Copy link
Member

Choose a reason for hiding this comment

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

I'd prefer not to introduce this complexity in the example... What if we change "5. Use single quotes for non-triple-quoted strings." to something like "5. Use single quotes in ruff format."?

Copy link
Member

Choose a reason for hiding this comment

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

(Most users won't / shouldn't need the flake8-quotes rules at all, especially if they're using the formatter.)

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.

None yet

2 participants