mahmoud / mahmoud/face

Help formatting cuts off multi-line doc strings

Open
#3 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
24
Forks
12
PR merge metrics
No merged PRs in 30d

Description

## What

If there is more than one line in a doc string of a function that is used to create a command. All but the first line are lost.

## Example

```python
from face import Command

def multi_line_doc():
"""
Some multi line doc string. Some multi line doc string. Some multi line doc string. Some multi line doc string.

Some multi line doc string. Some multi line doc string. Some multi line doc string. Some multi line doc string.
"""
return

cmd = Command(multi_line_doc, 'cmd')
cmd.run(argv=['example.py', '--help'])
```

This results in:

```
Usage: example.py [FLAGS]

Some multi line doc string. Some multi line doc string. Some multi line doc string. Some multi line doc string.

Flags:

--help / -h show this help message and exit
```

---

Is this desired, or something that can be changed.
If it is desired, should an error be raised?

Let me know what you think and I can take care of it.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue with the multi-line docstring and tracing how Command converts it into the --help output. Inspect the command creation and help-formatting entry points; done means the behavior for multi-line docstrings is decided and the resulting help text preserves the intended content or clearly reports an error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.