ruff/crates/ruff_linter/resources/test/fixtures/pydocstyle/sphinx.py
Charlie Marsh 3aa7e35a4c
Avoid removing newlines between docstring headers and rST blocks (#11609)
Given:

```python
def func():
    """
    Example:

    .. code-block:: python

        import foo
    """
```

Removing the newline after the `Example:` header breaks Sphinx
rendering.

See: https://github.com/astral-sh/ruff/issues/11577
2024-05-30 13:29:20 -04:00

67 lines
583 B
Python

def func():
"""
Example:
.. code-block:: python
import foo
"""
def func():
"""
Example:
.. code-block:: python
import foo
"""
def func():
"""
Example:
.. code-block:: python
import foo
"""
def func():
"""
Example
-------
.. code-block:: python
import foo
"""
def func():
"""
Example
-------
.. code-block:: python
import foo
"""
def func():
"""
Example
-------
.. code-block:: python
import foo
"""