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

Do not collapse multiline docstrings #9804

Closed
Glyphack opened this issue Feb 2, 2024 · 0 comments · Fixed by #9813
Closed

Do not collapse multiline docstrings #9804

Glyphack opened this issue Feb 2, 2024 · 0 comments · Fixed by #9813
Labels
bug Something isn't working formatter Related to the formatter

Comments

@Glyphack
Copy link
Contributor

Glyphack commented Feb 2, 2024

This issue was brought up in the review.

The summary is currently we collapse multiline docstrings, which is not compatible with black:

For example:

class Test:
    
    """
    Black's `Preview.module_docstring_newlines`


    A code black to format
"""

Black formats this to

class Test:
    """
    Black's `Preview.module_docstring_newlines`


    A code black to format
    """

and Ruff formats it to

class Test:
    """
    Black's `Preview.module_docstring_newlines`


    A code black to format"""
@zanieb zanieb added formatter Related to the formatter bug Something isn't working labels Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatter Related to the formatter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants