From ed9f5e63c2a36d0c0ca3e62634a8474519b3873a Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sun, 16 Oct 2016 13:38:04 -0400 Subject: [PATCH] MNT: correct default type from References/Examples The default value was a string, if there is input these will be filled as lists. --- numpydoc/docscrape.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/numpydoc/docscrape.py b/numpydoc/docscrape.py index ab3e458a..1f03cf0d 100644 --- a/numpydoc/docscrape.py +++ b/numpydoc/docscrape.py @@ -128,8 +128,8 @@ class NumpyDocString(collections.Mapping): 'See Also': [], 'Notes': [], 'Warnings': [], - 'References': '', - 'Examples': '', + 'References': [], + 'Examples': [], 'index': {} } @@ -365,8 +365,6 @@ def _parse(self): existing_content = self.get(section, []) if existing_content: existing_content += [''] - else: - existing_content = [] self[section] = existing_content + content def _error_location(self, msg, error=True):