From 2ccd2c104dda9d5eb4166ea07342228986f909a5 Mon Sep 17 00:00:00 2001 From: Monsangter Date: Fri, 19 Apr 2024 02:24:28 +0900 Subject: [PATCH 1/8] Document attr and attribute --- documentation/markup.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/documentation/markup.rst b/documentation/markup.rst index 2dec9d06b..951184b68 100644 --- a/documentation/markup.rst +++ b/documentation/markup.rst @@ -564,6 +564,16 @@ The directives are: .. attribute:: ham Description of the attribute. + + This directive should be used for defining attributes.:: + + .. attribute:: my-attr + This attribute `my-attr` should be defined with this directive. + + When referring to an attribute, use the ``:attr:`my-attr``` role:: + + :attr:`my-attr` + Use this role to refer to the attribute `my-attr` If is also possible to document an attribute outside of a class directive, for example if the documentation for different attributes and methods is From e28a62635c12eaea3fbf140724325c6a1efc805d Mon Sep 17 00:00:00 2001 From: Paul Bae <165033012+kokoavailable@users.noreply.github.com> Date: Fri, 19 Apr 2024 12:41:19 +0900 Subject: [PATCH 2/8] Update markup.rst --- documentation/markup.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/markup.rst b/documentation/markup.rst index 951184b68..47a157b2f 100644 --- a/documentation/markup.rst +++ b/documentation/markup.rst @@ -564,14 +564,14 @@ The directives are: .. attribute:: ham Description of the attribute. - + This directive should be used for defining attributes.:: .. attribute:: my-attr This attribute `my-attr` should be defined with this directive. When referring to an attribute, use the ``:attr:`my-attr``` role:: - + :attr:`my-attr` Use this role to refer to the attribute `my-attr` From 4b2218c4cd460752a9a2cedc4d3fa02660db48d5 Mon Sep 17 00:00:00 2001 From: Paul Bae <165033012+kokoavailable@users.noreply.github.com> Date: Sun, 21 Apr 2024 15:12:51 +0900 Subject: [PATCH 3/8] Update documentation/markup.rst [fix] commit suggestion Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- documentation/markup.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/documentation/markup.rst b/documentation/markup.rst index 47a157b2f..011c49601 100644 --- a/documentation/markup.rst +++ b/documentation/markup.rst @@ -570,11 +570,9 @@ The directives are: .. attribute:: my-attr This attribute `my-attr` should be defined with this directive. - When referring to an attribute, use the ``:attr:`my-attr``` role:: - - :attr:`my-attr` - Use this role to refer to the attribute `my-attr` + Refer to attributes with ``:attr:`` role:: + Use the :attr:`ham` attribute to spam the eggs. If is also possible to document an attribute outside of a class directive, for example if the documentation for different attributes and methods is split in multiple sections. The class name should then be included From ec793e4ceb3d9041db46fad5b99f4258e2c34a47 Mon Sep 17 00:00:00 2001 From: Paul Bae <165033012+kokoavailable@users.noreply.github.com> Date: Sun, 21 Apr 2024 15:14:50 +0900 Subject: [PATCH 4/8] Update documentation/markup.rst [fix] delete dup Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- documentation/markup.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/documentation/markup.rst b/documentation/markup.rst index 011c49601..a74d652df 100644 --- a/documentation/markup.rst +++ b/documentation/markup.rst @@ -565,11 +565,6 @@ The directives are: Description of the attribute. - This directive should be used for defining attributes.:: - - .. attribute:: my-attr - This attribute `my-attr` should be defined with this directive. - Refer to attributes with ``:attr:`` role:: Use the :attr:`ham` attribute to spam the eggs. From d02639d434ce10ad0de226abc83fd3c4c0c6914c Mon Sep 17 00:00:00 2001 From: Monsangter Date: Sun, 21 Apr 2024 15:42:07 +0900 Subject: [PATCH 5/8] [add] attribute def ref --- documentation/markup.rst | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/documentation/markup.rst b/documentation/markup.rst index 951184b68..3f43a1cef 100644 --- a/documentation/markup.rst +++ b/documentation/markup.rst @@ -24,6 +24,8 @@ variables/literals/code ````foo````, ````42````, ````len(s) - 1```` :ref:`inline True/False/None ````True````, ````False````, ````None```` :ref:`inline-markup` functions definitions ``.. function:: print(*args)`` :ref:`directives` functions references ``:func:`print``` :ref:`roles` +attribute definitions ``.. attribute: `attr-name``` :ref:`directives` +attribute references ``:attr:`attr-name``` :ref:`roles` reference labels ``.. _label-name:`` :ref:`doc-ref-role` internal references ``:ref:`label-name``` :ref:`doc-ref-role` external links ```Link text `_`` :ref:`hyperlinks` @@ -564,16 +566,12 @@ The directives are: .. attribute:: ham Description of the attribute. - - This directive should be used for defining attributes.:: - .. attribute:: my-attr - This attribute `my-attr` should be defined with this directive. - When referring to an attribute, use the ``:attr:`my-attr``` role:: - - :attr:`my-attr` - Use this role to refer to the attribute `my-attr` + Refer to an attribute, use the ``:attr:`` role:: + + + Use the :attr:`ham` attribute to spam the eggs. If is also possible to document an attribute outside of a class directive, for example if the documentation for different attributes and methods is From 52994b258c28a229c0926e779bc276f9addc92b0 Mon Sep 17 00:00:00 2001 From: Monsangter Date: Sun, 21 Apr 2024 21:55:59 +0900 Subject: [PATCH 6/8] [fix] trailing whitespace --- documentation/markup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/markup.rst b/documentation/markup.rst index 9cb993274..c97a9d74e 100644 --- a/documentation/markup.rst +++ b/documentation/markup.rst @@ -25,7 +25,7 @@ True/False/None ````True````, ````False````, ````None```` :ref:`inline functions definitions ``.. function:: print(*args)`` :ref:`directives` functions references ``:func:`print``` :ref:`roles` attribute definitions ``.. attribute: `attr-name``` :ref:`directives` -attribute references ``:attr:`attr-name``` :ref:`roles` +attribute references ``:attr:`attr-name``` :ref:`roles` reference labels ``.. _label-name:`` :ref:`doc-ref-role` internal references ``:ref:`label-name``` :ref:`doc-ref-role` external links ```Link text `_`` :ref:`hyperlinks` From fe3dc13a08895a45b92b70b590f76da5a2e6c8a6 Mon Sep 17 00:00:00 2001 From: Paul Bae <165033012+kokoavailable@users.noreply.github.com> Date: Mon, 22 Apr 2024 01:40:47 +0900 Subject: [PATCH 7/8] Update documentation/markup.rst information-units Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- documentation/markup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/markup.rst b/documentation/markup.rst index c97a9d74e..6b368be3c 100644 --- a/documentation/markup.rst +++ b/documentation/markup.rst @@ -24,7 +24,7 @@ variables/literals/code ````foo````, ````42````, ````len(s) - 1```` :ref:`inline True/False/None ````True````, ````False````, ````None```` :ref:`inline-markup` functions definitions ``.. function:: print(*args)`` :ref:`directives` functions references ``:func:`print``` :ref:`roles` -attribute definitions ``.. attribute: `attr-name``` :ref:`directives` +attribute definitions ``.. attribute: `attr-name``` :ref:`information-units` attribute references ``:attr:`attr-name``` :ref:`roles` reference labels ``.. _label-name:`` :ref:`doc-ref-role` internal references ``:ref:`label-name``` :ref:`doc-ref-role` From 8fc89cca983b3d4594477dc4f53b0c6691686680 Mon Sep 17 00:00:00 2001 From: Paul Bae <165033012+kokoavailable@users.noreply.github.com> Date: Mon, 22 Apr 2024 01:41:02 +0900 Subject: [PATCH 8/8] Update documentation/markup.rst , using Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- documentation/markup.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/documentation/markup.rst b/documentation/markup.rst index 6b368be3c..b72e1a952 100644 --- a/documentation/markup.rst +++ b/documentation/markup.rst @@ -567,8 +567,7 @@ The directives are: Description of the attribute. - - Refer to an attribute, use the ``:attr:`` role:: + Refer to an attribute using the ``:attr:`` role:: Use the :attr:`ham` attribute to spam the eggs.