Don't trim last empty line in docstrings (#9813)

This commit is contained in:
Micha Reiser 2024-02-05 14:29:24 +01:00 committed by GitHub
parent 55d0e1148c
commit 80fc02e7d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 186 additions and 2 deletions

View file

@ -0,0 +1,55 @@
# Tests that Ruff correctly preserves newlines before the closing quote
def test():
"""a, b
c"""
def test2():
"""a, b
c
"""
def test3():
"""a, b
"""
def test4():
"""
a, b
"""
def test5():
"""
a, b
a"""
def test6():
"""
a, b
c
"""
def test7():
"""
a, b
"""
def test7():
"""
a, b
"""