@@ -31,7 +31,7 @@ Use a code checker:
31
31
* pyflakes _: a tool to check Python code for errors by parsing
32
32
the source file instead of importing it.
33
33
* pycodestyle _: (formerly ``pep8 ``) a tool to check Python code against
34
- some of the style conventions in PEP 8 .
34
+ some of the style conventions in :pep: ` 8 ` .
35
35
* flake8 _: a tool that glues together ``pycodestyle ``, ``pyflakes ``,
36
36
``mccabe `` to check the style and quality of Python code.
37
37
* vim-flake8 _: a ``flake8 `` plugin for Vim.
@@ -287,14 +287,18 @@ takes the same form as the :ref:`Returns <returns>` section::
287
287
Support for the :ref: `Yields <yields >` section was added in `numpydoc
288
288
<https://github.com/numpy/numpydoc> `_ version 0.6.
289
289
290
+ .. _receives :
291
+
290
292
7. Receives
291
293
```````````
292
294
293
295
Explanation of parameters passed to a generator's ``.send() `` method,
294
- formatted as for Parameters, above. Since, like for Yields and Returns, a
295
- single object is always passed to the method, this may describe either the
296
- single parameter, or positional arguments passed as a tuple. If a docstring
297
- includes Receives it must also include Yields.
296
+ formatted as for :ref: `Parameters <params >`, above. Since, like for
297
+ :ref: `Yields <yields >` and :ref: `Returns <returns >`, a single object is
298
+ always passed to the method, this may describe either the single parameter,
299
+ or positional arguments passed as a tuple. If a docstring
300
+ includes :ref: `Receives <receives >` it must also include
301
+ :ref: `Yields <yields >`.
298
302
299
303
8. Other Parameters
300
304
```````````````````
@@ -303,6 +307,8 @@ An optional section used to describe infrequently used parameters.
303
307
It should only be used if a function has a large number of keyword
304
308
parameters, to prevent cluttering the :ref: `Parameters <params >` section.
305
309
310
+ .. _raises :
311
+
306
312
9. Raises
307
313
`````````
308
314
@@ -321,7 +327,7 @@ that are non-obvious or have a large chance of getting raised.
321
327
`````````
322
328
323
329
An optional section detailing which warnings get raised and
324
- under what conditions, formatted similarly to Raises.
330
+ under what conditions, formatted similarly to :ref: ` Raises < raises >` .
325
331
326
332
11. Warnings
327
333
````````````
@@ -545,8 +551,8 @@ Documenting classes
545
551
546
552
Class docstring
547
553
```````````````
548
- Use the same sections as outlined above (all except `` Returns `` are
549
- applicable). The constructor (``__init__ ``) should also be documented
554
+ Use the same sections as outlined above (all except :ref: ` Returns < returns >`
555
+ are applicable). The constructor (``__init__ ``) should also be documented
550
556
here, the :ref: `Parameters <params >` section of the docstring details the
551
557
constructor's parameters.
552
558
0 commit comments