complete srgweb.triton module
This commit is contained in:
41
reference/get_object.qmd
Normal file
41
reference/get_object.qmd
Normal file
@@ -0,0 +1,41 @@
|
||||
# get_object { #quartodoc.get_object }
|
||||
|
||||
```python
|
||||
get_object(
|
||||
path,
|
||||
object_name=None,
|
||||
parser='numpy',
|
||||
load_aliases=True,
|
||||
dynamic=False,
|
||||
loader=None,
|
||||
)
|
||||
```
|
||||
|
||||
Fetch a griffe object.
|
||||
|
||||
## Parameters {.doc-section .doc-section-parameters}
|
||||
|
||||
| Name | Type | Description | Default |
|
||||
|--------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
|
||||
| path | str | An import path to the object. This should have the form `path.to.module:object`. For example, `quartodoc:get_object` or `quartodoc:MdRenderer.render`. | _required_ |
|
||||
| object_name | \'str \| None\' | (Deprecated). A function name. | `None` |
|
||||
| parser | str | A docstring parser to use. | `'numpy'` |
|
||||
| load_aliases | | For aliases that were imported from other modules, should we load that module? | `True` |
|
||||
| dynamic | | Whether to dynamically import object. Useful if docstring is not hard-coded, but was set on object by running python code. | `False` |
|
||||
|
||||
## See Also {.doc-section .doc-section-see-also}
|
||||
|
||||
preview: print a user-friendly preview of a griffe object.
|
||||
|
||||
## Examples {.doc-section .doc-section-examples}
|
||||
|
||||
```python
|
||||
>>> get_function("quartodoc", "get_function")
|
||||
<Function('get_function', ...
|
||||
```
|
||||
|
||||
## Returns {.doc-section .doc-section-returns}
|
||||
|
||||
| Name | Type | Description |
|
||||
|--------|-----------|---------------|
|
||||
| x | dc.Object | abc |
|
10
reference/index.qmd
Normal file
10
reference/index.qmd
Normal file
@@ -0,0 +1,10 @@
|
||||
# Function reference {.doc .doc-index}
|
||||
|
||||
## Some functions
|
||||
|
||||
Functions to inspect docstrings.
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
| [get_object](get_object.qmd#quartodoc.get_object) | Fetch a griffe object. |
|
||||
| [preview](preview.qmd#quartodoc.preview) | Print a friendly representation of a griffe object (e.g. function, docstring) |
|
24
reference/preview.qmd
Normal file
24
reference/preview.qmd
Normal file
@@ -0,0 +1,24 @@
|
||||
# preview { #quartodoc.preview }
|
||||
|
||||
```python
|
||||
preview(ast, max_depth=999, compact=False, as_string=False)
|
||||
```
|
||||
|
||||
Print a friendly representation of a griffe object (e.g. function, docstring)
|
||||
|
||||
## Examples {.doc-section .doc-section-examples}
|
||||
|
||||
```python
|
||||
>>> from quartodoc import get_object
|
||||
>>> obj = get_object("quartodoc", "get_object")
|
||||
```
|
||||
|
||||
```python
|
||||
>>> preview(obj.docstring.parsed)
|
||||
...
|
||||
```
|
||||
|
||||
```python
|
||||
>>> preview(obj)
|
||||
...
|
||||
```
|
Reference in New Issue
Block a user