harbor run -t openthoughts/tasktrove-exp-rle-adversarial-5k-adversarial-4110harbor download openthoughts/tasktrove-exp-rle-adversarial-5k-adversarial-4110Task: Implement a lightweight rst2html_directives module to satisfy a comprehensive pytest suite
Objective Create a self-contained Python module named rst2html_directives that provides a set of directive classes and a helper function. Each directive must expose a run() method (and be usable in tests that monkeypatch init to a no-op) and return HTML fragments that exactly match the strings expected by the provided tests. The implementation should be independent of external libraries (no Docutils integration required) and should rely on straightforward Python string construction.
Deliverables
A Python package/module named rst2html_directives containing:
The implementation must pass all the provided tests exactly as written, including whitespace, line breaks, and tag structure.
Functional and behavior specification (as inferred from the tests) Note: The tests call run() and then str(data) on run()[0][0]. The implementation can return a simple wrapper object whose str returns the HTML snippet. The tests patch init for many directives; your code should not depend on any particular init behavior beyond supporting the attributes used in tests (arguments, options, content).
TEXT <URL>_ (where TEXT is the visible text and URL is the href), render as an anchor: '{TEXT}'. ', '<>', '<>`_', etc.), render as a literal list item with line stripped of surrounding whitespace: '{stripped_line}'.General constraints and guidance
Acceptance criteria
Notes for implementation
This task describes exactly what functionality to implement, the concrete behavior required to satisfy the tests, and actionable rules to follow to build a self-contained module.
Output only the instruction: