openedx / openedx/api-doc-tools
Can we ignore single line breaks in docstrings?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
It's common hard-wrap docstrings to abide by max-line-length conventions:
class MyView(...):
def get(...):
"""
Do a thing.
This is my long and very helpful description of what my endpoint is for
which I am manually breaking into two lines.
"""
which yields:
This is my long and very helpful description of what my endpoint is for
which I am manually breaking into two lines.
It'd be nice to instead see the soft-wrapped version in the output:
This is my long and very helpful description of what my endpoint is for which I am manually breaking into two lines.
Of course, double-line breaks should still be regarded as actual line breaks in the output.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the docstring parsing and generated-output logic in api-doc-tools, then inspect how single and double line breaks are currently handled. Use the examples in the issue as the behavioral check: single line breaks within a paragraph should be ignored in output, while double line breaks must remain paragraph breaks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100