generated from jCloud/repository-template
chore: update API reference
This commit is contained in:
1 parent
b1727c100f
commit
92dc2fcd47
2 files changed
+101
-101
No files matched your search
@@ -116,106 +116,6 @@ Returns a list of the arguments as strings for a function signature.
|
|||||||
:return: The list of function signature argument strings.
|
:return: The list of function signature argument strings.
|
||||||
:rtype: list[str]
|
:rtype: list[str]
|
||||||
|
|
||||||
## Function `_fit_row_length`
|
|
||||||
|
|
||||||
Fits the row length to the expected length.
|
|
||||||
|
|
||||||
If the row is too long, the tail, that makes it too long, is omitted.
|
|
||||||
If it is too short, it is filled with ``None`` (at the end).
|
|
||||||
|
|
||||||
### Function signature
|
|
||||||
|
|
||||||
```python
|
|
||||||
_fit_row_length(expected: int, row: tuple) -> tuple
|
|
||||||
```
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
|
|
||||||
Return type: `tuple`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
| Parameter | Type | Kind | Default value | Description |
|
|
||||||
| --- | --- | --- | --- | --- |
|
|
||||||
| `expected` | `int` | normal | -- | The expected length. |
|
|
||||||
| `row` | `tuple` | normal | -- | The row. |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Docstring
|
|
||||||
|
|
||||||
Fits the row length to the expected length.
|
|
||||||
|
|
||||||
If the row is too long, the tail, that makes it too long, is omitted.
|
|
||||||
If it is too short, it is filled with ``None`` (at the end).
|
|
||||||
|
|
||||||
:param expected: The expected length.
|
|
||||||
:type expected: int
|
|
||||||
:param row: The row.
|
|
||||||
:type row: tuple
|
|
||||||
|
|
||||||
## Function `_markdown_table`
|
|
||||||
|
|
||||||
Generates a table.
|
|
||||||
|
|
||||||
If ``allow_markdown_table`` is ``False``, an alternative
|
|
||||||
representation is used.
|
|
||||||
|
|
||||||
### Function signature
|
|
||||||
|
|
||||||
```python
|
|
||||||
_markdown_table(header: tuple, body: list[tuple], *, allow_markdown_table: bool = False, force_row_lengths: bool = False, one_line_values: bool = True, missing_value: str = '--') -> str
|
|
||||||
```
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
|
|
||||||
Return type: `str`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
| Parameter | Type | Kind | Default value | Description |
|
|
||||||
| --- | --- | --- | --- | --- |
|
|
||||||
| `header` | `tuple` | normal | -- | -- |
|
|
||||||
| `body` | `list[tuple]` | normal | -- | The table body. |
|
|
||||||
| `allow_markdown_table` | `bool` | keyword-only | `False` | Controls whether a markdown table may be used. |
|
|
||||||
| `force_row_lengths` | `bool` | keyword-only | `False` | Controls whether an exception is raised if a row does not have the correct length. |
|
|
||||||
| `one_line_values` | `bool` | keyword-only | `True` | Controls whether all newlines in all values are replaced with spaces. |
|
|
||||||
| `missing_value` | `str` | keyword-only | `'--'` | The string that is used if a value is missing (only if ``force_row_lengths`` is ``False``). |
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Docstring
|
|
||||||
|
|
||||||
Generates a table.
|
|
||||||
|
|
||||||
If ``allow_markdown_table`` is ``False``, an alternative
|
|
||||||
representation is used.
|
|
||||||
|
|
||||||
:param headers: The table headers.
|
|
||||||
:type headers: tuple
|
|
||||||
:param body: The table body.
|
|
||||||
:type body: list[tuple]
|
|
||||||
:param allow_markdown_table: Controls whether a markdown table may be
|
|
||||||
used.
|
|
||||||
:type allow_markdown_table: bool
|
|
||||||
:param force_row_lengths: Controls whether an exception is raised if
|
|
||||||
a row does not have the correct length.
|
|
||||||
:type force_row_lengths: bool
|
|
||||||
:param one_line_values: Controls whether all newlines in all values
|
|
||||||
are replaced with spaces.
|
|
||||||
:type one_line_values: bool
|
|
||||||
:param missing_value: The string that is used if a value is missing
|
|
||||||
(only if ``force_row_lengths`` is ``False``).
|
|
||||||
:type missing_value: str
|
|
||||||
|
|
||||||
## Function `_is_docstring`
|
## Function `_is_docstring`
|
||||||
|
|
||||||
Checks whether the docstring is a docstring or an empty docstring.
|
Checks whether the docstring is a docstring or an empty docstring.
|
||||||
|
|||||||
@@ -340,4 +340,104 @@ Returns the path segments relative to ``root``.
|
|||||||
:type root: pathlib.Path
|
:type root: pathlib.Path
|
||||||
|
|
||||||
:return: The path segments relative to ``root``.
|
:return: The path segments relative to ``root``.
|
||||||
:rtype: list[str]
|
:rtype: list[str]
|
||||||
|
|
||||||
|
## Function `fit_row_length`
|
||||||
|
|
||||||
|
Fits the row length to the expected length.
|
||||||
|
|
||||||
|
If the row is too long, the tail, that makes it too long, is omitted.
|
||||||
|
If it is too short, it is filled with ``None`` (at the end).
|
||||||
|
|
||||||
|
### Function signature
|
||||||
|
|
||||||
|
```python
|
||||||
|
fit_row_length(expected: int, row: tuple) -> tuple
|
||||||
|
```
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
Return type: `tuple`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Kind | Default value | Description |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| `expected` | `int` | normal | -- | The expected length. |
|
||||||
|
| `row` | `tuple` | normal | -- | The row. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Docstring
|
||||||
|
|
||||||
|
Fits the row length to the expected length.
|
||||||
|
|
||||||
|
If the row is too long, the tail, that makes it too long, is omitted.
|
||||||
|
If it is too short, it is filled with ``None`` (at the end).
|
||||||
|
|
||||||
|
:param expected: The expected length.
|
||||||
|
:type expected: int
|
||||||
|
:param row: The row.
|
||||||
|
:type row: tuple
|
||||||
|
|
||||||
|
## Function `markdown_table`
|
||||||
|
|
||||||
|
Generates a table.
|
||||||
|
|
||||||
|
If ``allow_markdown_table`` is ``False``, an alternative
|
||||||
|
representation is used.
|
||||||
|
|
||||||
|
### Function signature
|
||||||
|
|
||||||
|
```python
|
||||||
|
markdown_table(header: tuple, body: list[tuple], *, allow_markdown_table: bool = False, force_row_lengths: bool = False, one_line_values: bool = True, missing_value: str = '--') -> str
|
||||||
|
```
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
|
||||||
|
Return type: `str`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Parameter | Type | Kind | Default value | Description |
|
||||||
|
| --- | --- | --- | --- | --- |
|
||||||
|
| `header` | `tuple` | normal | -- | -- |
|
||||||
|
| `body` | `list[tuple]` | normal | -- | The table body. |
|
||||||
|
| `allow_markdown_table` | `bool` | keyword-only | `False` | Controls whether a markdown table may be used. |
|
||||||
|
| `force_row_lengths` | `bool` | keyword-only | `False` | Controls whether an exception is raised if a row does not have the correct length. |
|
||||||
|
| `one_line_values` | `bool` | keyword-only | `True` | Controls whether all newlines in all values are replaced with spaces. |
|
||||||
|
| `missing_value` | `str` | keyword-only | `'--'` | The string that is used if a value is missing (only if ``force_row_lengths`` is ``False``). |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Docstring
|
||||||
|
|
||||||
|
Generates a table.
|
||||||
|
|
||||||
|
If ``allow_markdown_table`` is ``False``, an alternative
|
||||||
|
representation is used.
|
||||||
|
|
||||||
|
:param headers: The table headers.
|
||||||
|
:type headers: tuple
|
||||||
|
:param body: The table body.
|
||||||
|
:type body: list[tuple]
|
||||||
|
:param allow_markdown_table: Controls whether a markdown table may be
|
||||||
|
used.
|
||||||
|
:type allow_markdown_table: bool
|
||||||
|
:param force_row_lengths: Controls whether an exception is raised if
|
||||||
|
a row does not have the correct length.
|
||||||
|
:type force_row_lengths: bool
|
||||||
|
:param one_line_values: Controls whether all newlines in all values
|
||||||
|
are replaced with spaces.
|
||||||
|
:type one_line_values: bool
|
||||||
|
:param missing_value: The string that is used if a value is missing
|
||||||
|
(only if ``force_row_lengths`` is ``False``).
|
||||||
|
:type missing_value: str
|
||||||
Reference in new issue
Block a user