summaryrefslogtreecommitdiff
path: root/doc/tutorial/describing-code.rst
diff options
context:
space:
mode:
authorJuan Luis Cano Rodríguez <hello@juanlu.space>2021-09-13 15:17:14 +0200
committerJuan Luis Cano Rodríguez <hello@juanlu.space>2021-09-13 15:17:14 +0200
commit87b8a0b211cfee05dd95a01857eb65803c24adf7 (patch)
tree149a92fed53237c5e4bd55236581258c3f2e6834 /doc/tutorial/describing-code.rst
parentc2847c2563ded91c560710fe237ca37518dcd9e9 (diff)
downloadsphinx-git-87b8a0b211cfee05dd95a01857eb65803c24adf7.tar.gz
Remove square brackets
Diffstat (limited to 'doc/tutorial/describing-code.rst')
-rw-r--r--doc/tutorial/describing-code.rst6
1 files changed, 2 insertions, 4 deletions
diff --git a/doc/tutorial/describing-code.rst b/doc/tutorial/describing-code.rst
index f353f9af1..df7418575 100644
--- a/doc/tutorial/describing-code.rst
+++ b/doc/tutorial/describing-code.rst
@@ -24,7 +24,7 @@ as follows:
To retrieve a list of random ingredients,
you can use the ``lumache.get_random_ingredients()`` function:
- .. py:function:: lumache.get_random_ingredients([kind=None])
+ .. py:function:: lumache.get_random_ingredients(kind=None)
Return a list of random ingredients as strings.
@@ -46,8 +46,6 @@ Notice several things:
- Sphinx parsed the argument of the ``.. py:function`` directive and
highlighted the module, the function name, and the parameters appropriately.
-- Putting a parameter inside square brackets is a convention that conveys it is
- optional. This syntax is not mandatory but can be useful for readers.
- The directive content includes a one-line description of the function,
as well as a :ref:`field list <rst-field-lists>` containing the function
parameter, its expected type, the return value, and the return type.
@@ -94,7 +92,7 @@ Then, add this exception to the original description of the function:
:caption: docs/source/usage.rst
:emphasize-lines: 7
- .. py:function:: lumache.get_random_ingredients([kind=None])
+ .. py:function:: lumache.get_random_ingredients(kind=None)
Return a list of random ingredients as strings.