File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,13 @@ def decorator(cls):
2828
2929
3030class _DocsPageFormatter (object ):
31- """
31+ """Generate an .rst doc page for an enumeration.
32+
3233 Formats a RestructuredText documention page (string) for the enumeration
3334 class parts passed to the constructor. An immutable one-shot service
3435 object.
3536 """
37+
3638 def __init__ (self , clsname , clsdict ):
3739 self ._clsname = clsname
3840 self ._clsdict = clsdict
@@ -52,14 +54,15 @@ def page_str(self):
5254
5355 @property
5456 def _intro_text (self ):
55- """
56- The docstring of the enumeration, formatted for use at the top of the
57- documentation page
58- """
57+ """Docstring of the enumeration, formatted for documentation page."""
5958 try :
6059 cls_docstring = self ._clsdict ['__doc__' ]
6160 except KeyError :
6261 cls_docstring = ''
62+
63+ if cls_docstring is None :
64+ return ''
65+
6366 return textwrap .dedent (cls_docstring ).strip ()
6467
6568 def _member_def (self , member ):
You can’t perform that action at this time.
0 commit comments