Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't trim last empty line in docstrings #9813

Merged
merged 1 commit into from Feb 5, 2024

Conversation

MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented Feb 4, 2024

Summary

This PR fixes a bug in our formatter where it would remove the last empty line for docstrings when """ is not intented:

def test7():
    """
    a, b
    
    
    
    
"""

Would get formatted to

def test7():
    """
    a, b
    
    
    
"""

(Removing the last empty line).

This is inconsistent with Black and how we format docstrings when the closing quotes are indented. The empty line does not get removed for:

def test7():
    """
    a, b
    
    
    
    
    """

The root cause of the divergence was that we use str::lines() which uses split_inclusive underneath that omits the last element if it matches the separator:

If the last element of the string is matched, that element will be considered the terminator of the preceding substring. That substring will be the last item returned by the iterator.

let v: Vec<&str> = "Mary had a little lamb\nlittle lamb\nlittle lamb.\n"
    .split_inclusive('\n').collect();
assert_eq!(v, ["Mary had a little lamb\n", "little lamb\n", "little lamb.\n"]); 

The PR fixes the divergence by using split instead.

Fixes #9804

Preview

This change is not gated behind preview because it doesn't change the output for already formatted code.

Test Plan

Added snapshot test

@MichaReiser MichaReiser added bug Something isn't working formatter Related to the formatter labels Feb 4, 2024
Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix! This is why bstr has a lines_with_terminator method. ;-)

Copy link

github-actions bot commented Feb 4, 2024

ruff-ecosystem results

Formatter (stable)

ℹ️ ecosystem check detected format changes. (+59 -1 lines in 3 files in 3 projects; 2 project errors; 38 projects unchanged)

bokeh/bokeh (+56 -0 lines across 1 file)

src/bokeh/plotting/glyph_api.py~L78

                              inner_radius=0.2, outer_radius=0.5)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Arc)

src/bokeh/plotting/glyph_api.py~L97

                 plot.asterisk(x=[1,2,3], y=[1,2,3], size=20, color="#F0027F")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Bezier)

src/bokeh/plotting/glyph_api.py~L120

                 plot.circle(x=[1, 2, 3], y=[1, 2, 3], size=20)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Block)

src/bokeh/plotting/glyph_api.py~L135

                 plot.block(x=[1, 2, 3], y=[1,2,3], width=0.5, height=1, , color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L151

                                   color="#FB8072", fill_alpha=0.2, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L167

                                 color="#FB8072", fill_color=None)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L183

                               color="#DD1C77", fill_alpha=0.2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L199

                               color="#DD1C77", fill_alpha=0.2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L215

                            color="#E6550D", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L231

                           color="#99D594", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L247

                              color="#1C9099", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L263

                                    color="#386CB0", fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L279

                                  color="#386CB0", fill_color=None)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L294

                 plot.dot(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#386CB0")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HArea)

src/bokeh/plotting/glyph_api.py~L310

                            fill_color="#99D594")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HAreaStep)

src/bokeh/plotting/glyph_api.py~L326

                                 step_mode="after", fill_color="#99D594")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HBar)

src/bokeh/plotting/glyph_api.py~L341

                 plot.hbar(y=[1, 2, 3], height=0.5, left=0, right=[1,2,3], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HSpan)

src/bokeh/plotting/glyph_api.py~L356

                 plot.hspan(y=[1, 2, 3], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HStrip)

src/bokeh/plotting/glyph_api.py~L371

                 plot.hstrip(y0=[1, 2, 5], y1=[3, 4, 8], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Ellipse)

src/bokeh/plotting/glyph_api.py~L387

                              color="#386CB0", fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L402

                 plot.hex(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,30], color="#74ADD1")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L418

                              color="#74ADD1", fill_color=None)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HexTile)

src/bokeh/plotting/glyph_api.py~L433

                 plot.hex_tile(r=[0, 0, 1], q=[1, 2, 2], fill_color="#74ADD1")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Image)

src/bokeh/plotting/glyph_api.py~L442

             If both ``palette`` and ``color_mapper`` are passed, a ``ValueError``
             exception will be raised. If neither is passed, then the ``Greys9``
             palette will be used as a default.
+
         """
 
     @glyph_method(glyphs.ImageRGBA)

src/bokeh/plotting/glyph_api.py~L450

         .. note::
             The ``image_rgba`` method accepts images as a two-dimensional array of RGBA
             values (encoded as 32-bit integers).
+
         """
 
     @glyph_method(glyphs.ImageStack)

src/bokeh/plotting/glyph_api.py~L473

                 plot.inverted_triangle(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#DE2D26")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Line)

src/bokeh/plotting/glyph_api.py~L488

                 p.line(x=[1, 2, 3, 4, 5], y=[6, 7, 2, 4, 5])
 
                 show(p)
+
         """
 
     @glyph_method(glyphs.MultiLine)

src/bokeh/plotting/glyph_api.py~L508

                             color=['red','green'])
 
                 show(p)
+
         """
 
     @glyph_method(glyphs.MultiPolygons)

src/bokeh/plotting/glyph_api.py~L528

                                 ys=[[[[4, 3, 3, 4]]], [[[1, 3, 1], [1.5, 2, 1.5]]]],
                                 color=['red', 'green'])
                 show(p)
+
         """
 
     @glyph_method(glyphs.Patch)

src/bokeh/plotting/glyph_api.py~L543

                 p.patch(x=[1, 2, 3, 2], y=[6, 7, 2, 2], color="#99d8c9")
 
                 show(p)
+
         """
 
     @glyph_method(glyphs.Patches)

src/bokeh/plotting/glyph_api.py~L563

                           color=["#43a2ca", "#a8ddb5"])
 
                 show(p)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L578

                 plot.plus(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#DE2D26")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Quad)

src/bokeh/plotting/glyph_api.py~L594

                           right=[1.2, 2.5, 3.7], color="#B3DE69")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Quadratic)

src/bokeh/plotting/glyph_api.py~L614

                         line_width=2)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Rect)

src/bokeh/plotting/glyph_api.py~L635

                 ``Rect`` glyphs are not well defined on logarithmic scales. Use
                 :class:`~bokeh.models.Block` or :class:`~bokeh.models.Quad` glyphs
                 instead.
+
         """
 
     @glyph_method(glyphs.Step)

src/bokeh/plotting/glyph_api.py~L650

                 plot.step(x=[1, 2, 3, 4, 5], y=[1, 2, 3, 2, 5], color="#FB8072")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Segment)

src/bokeh/plotting/glyph_api.py~L667

                              color="#F4A582", line_width=3)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L682

                 plot.square(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,30], color="#74ADD1")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L698

                                   color="#7FC97F",fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L714

                                 color="#7FC97F", fill_color=None)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L730

                                 color="#7FC97F",fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L746

                               color="#FDAE6B",fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L762

                           color="#1C9099", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L778

                               color="#386CB0", fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Text)

src/bokeh/plotting/glyph_api.py~L786

         .. note::
             The location and angle of the text relative to the ``x``, ``y`` coordinates
             is indicated by the alignment and baseline text properties.
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L802

                               color="#99D594", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L818

                                   color="#99D594", fill_color=None)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L834

                               color="#99D594", line_width=2)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VArea)

src/bokeh/plotting/glyph_api.py~L850

                            fill_color="#99D594")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VAreaStep)

src/bokeh/plotting/glyph_api.py~L866

                                 step_mode="after", fill_color="#99D594")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VBar)

src/bokeh/plotting/glyph_api.py~L881

                 plot.vbar(x=[1, 2, 3], width=0.5, bottom=0, top=[1,2,3], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VSpan)

src/bokeh/plotting/glyph_api.py~L896

                 plot.vspan(x=[1, 2, 3], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VStrip)

src/bokeh/plotting/glyph_api.py~L911

                 plot.vstrip(x0=[1, 2, 5], x1=[3, 4, 8], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Wedge)

src/bokeh/plotting/glyph_api.py~L927

                            end_angle=4.1, radius_units="screen", color="#2b8cbe")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L942

                 plot.x(x=[1, 2, 3], y=[1, 2, 3], size=[10, 20, 25], color="#fa9fb5")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L957

                 plot.y(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#DE2D26")
 
                 show(plot)
+
         """
 
     # -------------------------------------------------------------------------

docker/docker-py (+1 -0 lines across 1 file)

docker/api/container.py~L647

             ... )
             {'CapDrop': ['MKNOD'], 'LxcConf': None, 'Privileged': True,
             'VolumesFrom': ['nostalgic_newton'], 'PublishAllPorts': False}
+
         """
         if not kwargs:
             kwargs = {}

rotki/rotki (+2 -1 lines across 1 file)

rotkehlchen/db/utils.py~L483

 def protect_password_sqlcipher(password: str) -> str:
     """A double quote in the password would close the string. To escape it double it
 
-    source: https://stackoverflow.com/a/603579/110395"""
+    source: https://stackoverflow.com/a/603579/110395
+    """
     return password.replace(r'"', r'""')
 
 

sphinx-doc/sphinx (error)

ruff format --no-preview --exclude tests/roots/test-pycode/cp_1251_coded.py

ruff failed
  Cause: Selection of unstable rules without the `--preview` flag is not allowed. Enable preview or remove selection of:
	- FURB113
	- FURB131
	- FURB132

openai/openai-cookbook (error)

warning: Detected debug build without --no-cache.
error: Failed to parse examples/dalle/Image_generations_edits_and_variations_with_DALL-E.ipynb:3:7:8: Unexpected token 'prompt'

Formatter (preview)

ℹ️ ecosystem check detected format changes. (+59 -1 lines in 3 files in 3 projects; 1 project error; 39 projects unchanged)

bokeh/bokeh (+56 -0 lines across 1 file)

ruff format --preview

src/bokeh/plotting/glyph_api.py~L78

                              inner_radius=0.2, outer_radius=0.5)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Arc)

src/bokeh/plotting/glyph_api.py~L97

                 plot.asterisk(x=[1,2,3], y=[1,2,3], size=20, color="#F0027F")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Bezier)

src/bokeh/plotting/glyph_api.py~L120

                 plot.circle(x=[1, 2, 3], y=[1, 2, 3], size=20)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Block)

src/bokeh/plotting/glyph_api.py~L135

                 plot.block(x=[1, 2, 3], y=[1,2,3], width=0.5, height=1, , color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L151

                                   color="#FB8072", fill_alpha=0.2, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L167

                                 color="#FB8072", fill_color=None)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L183

                               color="#DD1C77", fill_alpha=0.2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L199

                               color="#DD1C77", fill_alpha=0.2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L215

                            color="#E6550D", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L231

                           color="#99D594", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L247

                              color="#1C9099", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L263

                                    color="#386CB0", fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L279

                                  color="#386CB0", fill_color=None)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L294

                 plot.dot(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#386CB0")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HArea)

src/bokeh/plotting/glyph_api.py~L310

                            fill_color="#99D594")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HAreaStep)

src/bokeh/plotting/glyph_api.py~L326

                                 step_mode="after", fill_color="#99D594")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HBar)

src/bokeh/plotting/glyph_api.py~L341

                 plot.hbar(y=[1, 2, 3], height=0.5, left=0, right=[1,2,3], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HSpan)

src/bokeh/plotting/glyph_api.py~L356

                 plot.hspan(y=[1, 2, 3], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HStrip)

src/bokeh/plotting/glyph_api.py~L371

                 plot.hstrip(y0=[1, 2, 5], y1=[3, 4, 8], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Ellipse)

src/bokeh/plotting/glyph_api.py~L387

                              color="#386CB0", fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L402

                 plot.hex(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,30], color="#74ADD1")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L418

                              color="#74ADD1", fill_color=None)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.HexTile)

src/bokeh/plotting/glyph_api.py~L433

                 plot.hex_tile(r=[0, 0, 1], q=[1, 2, 2], fill_color="#74ADD1")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Image)

src/bokeh/plotting/glyph_api.py~L442

             If both ``palette`` and ``color_mapper`` are passed, a ``ValueError``
             exception will be raised. If neither is passed, then the ``Greys9``
             palette will be used as a default.
+
         """
 
     @glyph_method(glyphs.ImageRGBA)

src/bokeh/plotting/glyph_api.py~L450

         .. note::
             The ``image_rgba`` method accepts images as a two-dimensional array of RGBA
             values (encoded as 32-bit integers).
+
         """
 
     @glyph_method(glyphs.ImageStack)

src/bokeh/plotting/glyph_api.py~L473

                 plot.inverted_triangle(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#DE2D26")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Line)

src/bokeh/plotting/glyph_api.py~L488

                 p.line(x=[1, 2, 3, 4, 5], y=[6, 7, 2, 4, 5])
 
                 show(p)
+
         """
 
     @glyph_method(glyphs.MultiLine)

src/bokeh/plotting/glyph_api.py~L508

                             color=['red','green'])
 
                 show(p)
+
         """
 
     @glyph_method(glyphs.MultiPolygons)

src/bokeh/plotting/glyph_api.py~L528

                                 ys=[[[[4, 3, 3, 4]]], [[[1, 3, 1], [1.5, 2, 1.5]]]],
                                 color=['red', 'green'])
                 show(p)
+
         """
 
     @glyph_method(glyphs.Patch)

src/bokeh/plotting/glyph_api.py~L543

                 p.patch(x=[1, 2, 3, 2], y=[6, 7, 2, 2], color="#99d8c9")
 
                 show(p)
+
         """
 
     @glyph_method(glyphs.Patches)

src/bokeh/plotting/glyph_api.py~L563

                           color=["#43a2ca", "#a8ddb5"])
 
                 show(p)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L578

                 plot.plus(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#DE2D26")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Quad)

src/bokeh/plotting/glyph_api.py~L594

                           right=[1.2, 2.5, 3.7], color="#B3DE69")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Quadratic)

src/bokeh/plotting/glyph_api.py~L614

                         line_width=2)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Rect)

src/bokeh/plotting/glyph_api.py~L635

                 ``Rect`` glyphs are not well defined on logarithmic scales. Use
                 :class:`~bokeh.models.Block` or :class:`~bokeh.models.Quad` glyphs
                 instead.
+
         """
 
     @glyph_method(glyphs.Step)

src/bokeh/plotting/glyph_api.py~L650

                 plot.step(x=[1, 2, 3, 4, 5], y=[1, 2, 3, 2, 5], color="#FB8072")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Segment)

src/bokeh/plotting/glyph_api.py~L667

                              color="#F4A582", line_width=3)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L682

                 plot.square(x=[1, 2, 3], y=[1, 2, 3], size=[10,20,30], color="#74ADD1")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L698

                                   color="#7FC97F",fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L714

                                 color="#7FC97F", fill_color=None)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L730

                                 color="#7FC97F",fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L746

                               color="#FDAE6B",fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L762

                           color="#1C9099", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L778

                               color="#386CB0", fill_color=None, line_width=2)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Text)

src/bokeh/plotting/glyph_api.py~L786

         .. note::
             The location and angle of the text relative to the ``x``, ``y`` coordinates
             is indicated by the alignment and baseline text properties.
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L802

                               color="#99D594", line_width=2)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L818

                                   color="#99D594", fill_color=None)
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L834

                               color="#99D594", line_width=2)
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VArea)

src/bokeh/plotting/glyph_api.py~L850

                            fill_color="#99D594")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VAreaStep)

src/bokeh/plotting/glyph_api.py~L866

                                 step_mode="after", fill_color="#99D594")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VBar)

src/bokeh/plotting/glyph_api.py~L881

                 plot.vbar(x=[1, 2, 3], width=0.5, bottom=0, top=[1,2,3], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VSpan)

src/bokeh/plotting/glyph_api.py~L896

                 plot.vspan(x=[1, 2, 3], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.VStrip)

src/bokeh/plotting/glyph_api.py~L911

                 plot.vstrip(x0=[1, 2, 5], x1=[3, 4, 8], color="#CAB2D6")
 
                 show(plot)
+
         """
 
     @glyph_method(glyphs.Wedge)

src/bokeh/plotting/glyph_api.py~L927

                            end_angle=4.1, radius_units="screen", color="#2b8cbe")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L942

                 plot.x(x=[1, 2, 3], y=[1, 2, 3], size=[10, 20, 25], color="#fa9fb5")
 
                 show(plot)
+
         """
 
     @marker_method()

src/bokeh/plotting/glyph_api.py~L957

                 plot.y(x=[1, 2, 3], y=[1, 2, 3], size=20, color="#DE2D26")
 
                 show(plot)
+
         """
 
     # -------------------------------------------------------------------------

docker/docker-py (+1 -0 lines across 1 file)

ruff format --preview

docker/api/container.py~L647

             ... )
             {'CapDrop': ['MKNOD'], 'LxcConf': None, 'Privileged': True,
             'VolumesFrom': ['nostalgic_newton'], 'PublishAllPorts': False}
+
         """
         if not kwargs:
             kwargs = {}

rotki/rotki (+2 -1 lines across 1 file)

ruff format --preview

rotkehlchen/db/utils.py~L479

 def protect_password_sqlcipher(password: str) -> str:
     """A double quote in the password would close the string. To escape it double it
 
-    source: https://stackoverflow.com/a/603579/110395"""
+    source: https://stackoverflow.com/a/603579/110395
+    """
     return password.replace(r'"', r'""')
 
 

openai/openai-cookbook (error)

ruff format --preview

warning: Detected debug build without --no-cache.
error: Failed to parse examples/dalle/Image_generations_edits_and_variations_with_DALL-E.ipynb:3:7:8: Unexpected token 'prompt'

@MichaReiser MichaReiser enabled auto-merge (squash) February 5, 2024 13:23
@MichaReiser MichaReiser merged commit 80fc02e into main Feb 5, 2024
16 checks passed
@MichaReiser MichaReiser deleted the docstring-dont-trim-last-line branch February 5, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatter Related to the formatter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not collapse multiline docstrings
3 participants