Skip to content

Commit

Permalink
ruff_python_formatter: test docstring-code-line-width=60
Browse files Browse the repository at this point in the history
This updates the line width setting and the test output. Since most of
our tests use very short lines, the chnages are small. They look like
what I'd expect.

Ref #8855
  • Loading branch information
BurntSushi committed Dec 8, 2023
1 parent 0334baa commit f87c42a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
{
"docstring_code": "enabled",
"docstring_code_line_width": 88,
"docstring_code_line_width": 60,
"indent_style": "space",
"indent_width": 4
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12306,7 +12306,7 @@ quote-style = Double
line-ending = LineFeed
magic-trailing-comma = Respect
docstring-code = Enabled
docstring-code-line-width = LineWidth(88)
docstring-code-line-width = LineWidth(60)
preview = Disabled
```
Expand Down Expand Up @@ -12550,11 +12550,22 @@ def doctest_long_lines():
This won't get wrapped even though it exceeds our configured
line width because it doesn't exceed the line width within this
docstring. e.g, the `f` in `foo` is treated as the first column.
>>> foo, bar, quux = this_is_a_long_line(lion, giraffe, hippo, zeba, lemur, penguin, monkey)
>>> foo, bar, quux = this_is_a_long_line(
... lion, giraffe, hippo, zeba, lemur, penguin, monkey
... )

But this one is long enough to get wrapped.
>>> foo, bar, quux = this_is_a_long_line(
... lion, giraffe, hippo, zeba, lemur, penguin, monkey, spider, bear, leopard
... lion,
... giraffe,
... hippo,
... zeba,
... lemur,
... penguin,
... monkey,
... spider,
... bear,
... leopard,
... )
"""
# This demostrates a normal line that will get wrapped but won't
Expand Down

0 comments on commit f87c42a

Please sign in to comment.