-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingdocstringRelated to docstring linting or formattingRelated to docstring linting or formatting
Description
My function docstring looks like this, and is missing whitespace between the sections "Parameters" and "Examples"
def pow(self, exponent: int | float | Series | Expr) -> Self:
"""
Raise expression to the power of the given exponent.
Parameters
----------
exponent
...
Examples
--------
>>> df = pl.DataFrame({"foo": [1, 2, 3, 4]})
"""
...After autofixing, two blank lines are inserted. Only a single blank line would be sufficient:
def pow(self, exponent: int | float | Series | Expr) -> Self:
"""
Raise expression to the power of the given exponent.
Parameters
----------
exponent
...
Examples
--------
>>> df = pl.DataFrame({"foo": [1, 2, 3, 4]})
"""
...The reason seems to be that D410 (missing blank line after section) and D411 (missing blank line before section) are applied at the same time.
This is on the latest ruff version.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingdocstringRelated to docstring linting or formattingRelated to docstring linting or formatting