Skip to content

Commit 59e7aec

Browse files
committed
docs: tweak class example
1 parent f9f942a commit 59e7aec

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/get-started/docstring-examples.qmd

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,7 @@ Linking to functions documented outside your package must be configured in the [
138138

139139
See [this numpydoc page on documenting classes](https://numpydoc.readthedocs.io/en/latest/format.html#documenting-classes).
140140

141-
Be sure to note these two important pieces:
142-
143-
* Document your `__init__` method parameters on the class docstring.
144-
* You can use an `Attributes` section in your docstring.
141+
Below is a simple example of a class docstring.
145142

146143
```python
147144
class MyClass:
@@ -165,3 +162,9 @@ class MyClass:
165162
def __init__(self, a: str):
166163
self.a = a
167164
```
165+
166+
Note these two important pieces:
167+
168+
* Document your `__init__` method parameters on the class docstring.
169+
* You can use an `Attributes` section in your docstring.
170+

0 commit comments

Comments
 (0)