#133
gdtest_rst_mixed_dirs
OK
CONFIG
Tests multiple RST directives in same docstrings
Docstrings mix multiple RST directives: versionadded, deprecated, note, warning, tip in the same module and sometimes SAME docstring. All should render as distinct callouts.
Build Mode
● Has great-docs.yml
This package ships a pre-supplied config.
The great-docs init step is skipped and
great-docs build uses the spec-defined configuration directly.
Tests specific config options and their rendered output.
Dimensions
L9
L9Mixed RST directivesdocstring
Source Files
gdtest_rst_mixed_dirs/
__init__.py
"""Package testing mixed RST directives in docstrings."""
__version__ = "0.1.0"
__all__ = ["process_v2", "transform_legacy", "safe_delete"]
def process_v2(data: list) -> list:
"""
Process data using the v2 pipeline.
Parameters
----------
data
The data to process.
Returns
-------
list
The processed data.
.. versionadded:: 2.0
.. note::
Replaces the old process() function.
.. tip::
Use with batch_mode for best results.
"""
return data
def transform_legacy(data: dict) -> dict:
"""
Transform data using the legacy algorithm.
Parameters
----------
data
The data dictionary to transform.
Returns
-------
dict
The transformed data.
.. deprecated:: 1.0
Use transform_v2() instead.
.. warning::
May produce unexpected results with nested dicts.
"""
return data
def safe_delete(item_id: str) -> bool:
"""
Safely delete an item by its identifier.
Parameters
----------
item_id
The identifier of the item to delete.
Returns
-------
bool
True if the item was deleted successfully.
.. important::
Validates before deletion.
.. caution::
Rate limited to 100 calls per minute.
"""
return TrueREADME.md
# gdtest-rst-mixed-dirs Tests mixed RST directives in docstrings.
great-docs.yml
parser: sphinx