We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bc4f20 commit 2216db9Copy full SHA for 2216db9
1 file changed
Tools/clinic/libclinic/function.py
@@ -169,12 +169,12 @@ def methoddef_flags(self) -> str | None:
169
170
@property
171
def docstring_line_width(self) -> int:
172
- """PEP 8 requires that docstrings are limited to 72 characters:
+ """Return the maximum line width for docstring lines.
173
174
- The Python standard library is conservative and requires
175
- limiting lines to 79 characters (and docstrings to 72).
176
-
177
- Methods have an extra level of indentation, so we use 68.
+ Pydoc adds indentation when displaying functions and methods.
+ To keep the total width of within 80 characters, we use a
+ maximum of 76 characters for global functions and classes,
+ and 72 characters for methods.
178
"""
179
if self.cls is not None and not self.kind.new_or_init:
180
return 72
0 commit comments