Skip to content

Formatter/ Linter: Quote consistency #15910

Open
@GutiCW

Description

If I configure them as single quotes, I wouldn't expect any string being wrapped in double quotes (simple or tripled).

Wouldn't it be more consistent to always force the according quotes?
E.g., single quotes: If it contains ' -> format to tripled single quotes ''', else simple single quote '.

Keywords

tripled single double quotes Q000 Q001 Q002 Q003

Code snippet

THREE_DOUBLE_QUOTES = """John Doe's text."""

Config

quote-style = 'single'

[lint.flake8-quotes]
inline-quotes = 'single'
multiline-quotes = 'single'

Sample

Playground

Ruff

v0.9.4


Perhaps related:

Metadata

Assignees

No one assigned

    Labels

    questionAsking for support or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions