File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ def _str_member_list(self, name):
130
130
maxlen_0 = max (3 , max ([len (x [0 ]) for x in others ]))
131
131
hdr = sixu ("=" )* maxlen_0 + sixu (" " ) + sixu ("=" )* 10
132
132
fmt = sixu ('%%%ds %%s ' ) % (maxlen_0 ,)
133
- out += ['' , hdr ]
133
+ out += ['' , '' , hdr ]
134
134
for param , param_type , desc in others :
135
135
desc = sixu (" " ).join (x .strip () for x in desc ).strip ()
136
136
if param_type :
Original file line number Diff line number Diff line change @@ -677,6 +677,8 @@ def test_duplicate_signature():
677
677
Current time.
678
678
y : ndarray
679
679
Current variable values.
680
+ x : float
681
+ Some parameter
680
682
681
683
Methods
682
684
-------
@@ -712,6 +714,8 @@ def test_class_members_doc():
712
714
Current time.
713
715
y : ndarray
714
716
Current variable values.
717
+ x : float
718
+ Some parameter
715
719
716
720
Methods
717
721
-------
@@ -726,7 +730,13 @@ def test_class_members_doc():
726
730
""" )
727
731
728
732
def test_class_members_doc_sphinx ():
729
- doc = SphinxClassDoc (None , class_doc_txt )
733
+ class Foo :
734
+ @property
735
+ def x (self ):
736
+ """Test attribute"""
737
+ return None
738
+
739
+ doc = SphinxClassDoc (Foo , class_doc_txt )
730
740
non_blank_line_by_line_compare (str (doc ),
731
741
"""
732
742
Foo
@@ -747,6 +757,11 @@ def test_class_members_doc_sphinx():
747
757
748
758
.. rubric:: Attributes
749
759
760
+ .. autosummary::
761
+ :toctree:
762
+
763
+ x
764
+
750
765
=== ==========
751
766
t (float) Current time.
752
767
y (ndarray) Current variable values.
You can’t perform that action at this time.
0 commit comments