mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 05:25:17 +00:00
Don't trim last empty line in docstrings (#9813)
This commit is contained in:
parent
55d0e1148c
commit
80fc02e7d5
3 changed files with 186 additions and 2 deletions
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
|
||||
|
||||
|
||||
|
||||
"""
|
Loading…
Add table
Add a link
Reference in a new issue