mirror of
https://github.com/astral-sh/ruff
synced 2026-01-08 23:24:31 -05:00
Don't trim last empty line in docstrings (#9813)
This commit is contained in:
55
crates/ruff_python_formatter/resources/test/fixtures/ruff/docstring_newlines.py
vendored
Normal file
55
crates/ruff_python_formatter/resources/test/fixtures/ruff/docstring_newlines.py
vendored
Normal 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
|
||||
|
||||
|
||||
|
||||
"""
|
||||
Reference in New Issue
Block a user