Skip to content

Commit

Permalink
ruff_python_formatter: run existing tests with "dynamic" setting
Browse files Browse the repository at this point in the history
This tests the "dynamic" line width mode. As with the fixed line width
setting, not much changes here since most of our code examples use very
short lines.

In a subsequent commit, we'll add more tests specifically targeted at
line width.
  • Loading branch information
BurntSushi committed Dec 11, 2023
1 parent dd96299 commit 76e2795
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
},
{
"docstring_code": "enabled",
"docstring_code_line_width": 88,
"docstring_code_line_width": "dynamic",
"indent_style": "space",
"indent_width": 4
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13682,7 +13682,7 @@ quote-style = Double
line-ending = LineFeed
magic-trailing-comma = Respect
docstring-code = Enabled
docstring-code-line-width = 88
docstring-code-line-width = "dynamic"
preview = Disabled
```
Expand Down Expand Up @@ -13926,7 +13926,9 @@ 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(
Expand Down

0 comments on commit 76e2795

Please sign in to comment.