Skip to content

Commit ed9f5e6

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 fc098c4 commit ed9f5e6

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
@@ -128,8 +128,8 @@ class NumpyDocString(collections.Mapping):
128128
'See Also': [],
129129
'Notes': [],
130130
'Warnings': [],
131-
'References': '',
132-
'Examples': '',
131+
'References': [],
132+
'Examples': [],
133133
'index': {}
134134
}
135135

@@ -365,8 +365,6 @@ def _parse(self):
365365
existing_content = self.get(section, [])
366366
if existing_content:
367367
existing_content += ['']
368-
else:
369-
existing_content = []
370368
self[section] = existing_content + content
371369

372370
def _error_location(self, msg, error=True):

0 commit comments

Comments
 (0)