Replies: 2 comments 8 replies
-
Are you using the Ruff CLI, or the Ruff extension in your editor? |
Beta Was this translation helpful? Give feedback.
2 replies
-
I believe the code block needs to be indented: def func():
"""Foo
Examples
--------
.. code-block:: python
import my_package
do_stuff(...)
x=1
"""
... \cc @BurntSushi who knows the rules. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have the following lines in
ruff.toml
:I've tried adding code in my docstring in two ways:
A:
B:
But the ruff extension never seems to format this code in the docstring.
What am I doing wrong?
Beta Was this translation helpful? Give feedback.
All reactions