Skip to content

Commit 832d2ee

Browse files
committed
MNT: correct default type from References/Examples
The default value was a string, if there is input these will be filled as lists.
1 parent 71d2a30 commit 832d2ee

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

numpydoc/docscrape.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ class NumpyDocString(collections.Mapping):
113113
'See Also': [],
114114
'Notes': [],
115115
'Warnings': [],
116-
'References': '',
117-
'Examples': '',
116+
'References': [],
117+
'Examples': [],
118118
'index': {}
119119
}
120120

@@ -348,8 +348,6 @@ def _parse(self):
348348
existing_content = self.get(section, [])
349349
if existing_content:
350350
existing_content += ['']
351-
else:
352-
existing_content = []
353351
self[section] = existing_content + content
354352

355353
# string conversion routines

0 commit comments

Comments
 (0)