-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Line overflow in pydoc output due to long docstrings #150285
Copy link
Copy link
Open
Labels
3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtopic-argument-clinic
Metadata
Metadata
Assignees
Labels
3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesnew features, bugs and security fixesdocsDocumentation in the Doc dirDocumentation in the Doc dirtopic-argument-clinic
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Todo
Following PEP 8 automatically leads to pydoc generating outpurt that fits in 80 columns, except some long signatures, inherited standard docstrings and URIs. Exceptions happen here and there, and I usually fix them whem working on the module. Things are more complicated with the C code. Old docstrings mostly fit in 80 columns, but Argument Clinic provokes writing longer lines. There is a check for docstring line width, but it is incorrect. It's now a chicken and egg problem. We cannot simply fix the limits in Argument Clinic, because this will produce a large amount of warnings and errors (especially in recently added modules), but until it was fixed, the new code will add too long docstrings.
There are only few modules which need large number of corrections and many modules which require only 1-2 fixes. Most modules do not need any changes. I am going to fix large modules in separate PRs, then fix many simple cases at once and fix the limits in Argument Clinic.
Linked PRs