Skip to content

Missing "What it does" details on D300 #20838

@ulgens

Description

@ulgens

Summary

https://docs.astral.sh/ruff/rules/triple-single-quotes/ says

Checks for docstrings that use '''triple single quotes''' instead of """triple double quotes""".

and shares an example for the described case. The explanation and the example is correct for the given case, but it's not the only case D300 handles. It also converts '''docstring''' to """docstring""" and 'docstring' to """docstring""".

To sum up, D300 doesn't convert a specific case to triple double quotes but it guarantees that the docstrings are wrapped by triple double quotes. I think the page should be updated to reflect that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions