mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Updated Docstring Guidelines (markdown)
@ -259,6 +259,16 @@ See [MyST Markdown documentation](https://myst-parser.readthedocs.io/en/v0.15.1/
|
||||
|
||||
Below is a quick reference of how to use MyST Markdown.
|
||||
|
||||
### Autodoc directives
|
||||
|
||||
| reSTructuredText| Purpose | MyST Markdown |
|
||||
|-----------|---------|---------|
|
||||
| `:class:` | Reference a class | {class}\`MyClass\` |
|
||||
| `:func:` | Reference a function | {func}\`my_module.my_function\` |
|
||||
| `:meth:` | Reference a method | {meth}\`MyClass.my_method\` |
|
||||
| `:mod:` | Reference a module | {mod}\`my_module\` |
|
||||
|
||||
|
||||
### Python References
|
||||
|
||||
| reSTructuredText| Purpose | MyST Markdown |
|
||||
@ -272,6 +282,7 @@ Below is a quick reference of how to use MyST Markdown.
|
||||
| `:py:exc:` | Reference an exception | {py:exc}\`MyException\` |
|
||||
| `:py:obj:` | Reference any Python object | {py:obj}\`my_module.MyClass.my_function\` |
|
||||
|
||||
|
||||
### Auto-Documentation Directives
|
||||
|
||||
Autodoc and autosummary directives should be wrapped in the `{eval-rst}` directive.
|
||||
|
Reference in New Issue
Block a user