Created
February 25, 2022 18:49
-
-
Save hamelsmu/06a4c5024e332b60e84fb2502040de4e to your computer and use it in GitHub Desktop.
Example of Schema For Docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<DocSection type="class" name="ExampleError" module="test_lib.example" link="test_lib/example.py#L155"> | |
<SigArgSection> | |
<SigArg name="msg" type="str" default="foo"/> | |
<SigArg name="code" type="str" default="foo"/> | |
</SigArgSection> | |
<Description summary="Exceptions are documented in the same way as classes." extended_summary="The __init__ method may be documented in either the class level\ndocstring, or as a docstring on the __init__ method itself.\n\nEither form is acceptable, but the two should not be mixed. Choose one\nconvention to document the __init__ method and be consistent with it." /> | |
<ParamSection name="Parameters"> | |
<Parameter name="msg" type="str" desc="Human readable string describing the exception." /> | |
<Parameter name="code" type=":obj:`int`, optional" desc="Numeric error code." /> | |
</ParamSection> | |
<ParamSection name="Attributes"> | |
<Parameter name="msg" type="str" desc="Human readable string describing the exception." /> | |
<Parameter name="code" type="int" desc="Numeric error code." /> | |
</ParamSection> | |
<ParamSection name="Returns"> | |
<Parameter name="msg" type="str" desc="Human readable string describing the exception." /> | |
<Parameter name="code" type="int" desc="Numeric error code." /> | |
</ParamSection> | |
</DocSection> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment