Message388373
When viewing docs for classes that use annotations, pydoc's rendering of argument lists is regularly truncated at the terminal edge (if using `less -S`), or wrapped in a manner where quickly scanning the output is next to impossible.
My 'classic' example is 'pydoc aiohttp.client.ClientSession', where the __init__ argument list wraps to 24 lines.
The pull request attached to this issue works around the problem by formatting arguments one-per-line if the sum of the arguments would exceed a hard-coded width of 150 characters. It is more of an RFC than a suggested fix. It produces acceptable formatting, but I'm not sure where the correct fix should be made -- in the inspect module, or somehow in the pydoc module, or even what the correct fix shuld be.
I will include a before/after screenshot in the pull request
I will attach before/after screenshot |
|
Date |
User |
Action |
Args |
2021-03-09 19:12:29 | dw | set | recipients:
+ dw |
2021-03-09 19:12:29 | dw | set | messageid: <1615317149.57.0.837523610181.issue43451@roundup.psfhosted.org> |
2021-03-09 19:12:29 | dw | link | issue43451 messages |
2021-03-09 19:12:29 | dw | create | |
|