From 832d2ee3e54ec78352b5ec0ee429693c17c78c1a 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 62ea82ae..0fa90254 100644 --- a/numpydoc/docscrape.py +++ b/numpydoc/docscrape.py @@ -113,8 +113,8 @@ class NumpyDocString(collections.Mapping): 'See Also': [], 'Notes': [], 'Warnings': [], - 'References': '', - 'Examples': '', + 'References': [], + 'Examples': [], 'index': {} } @@ -348,8 +348,6 @@ def _parse(self): existing_content = self.get(section, []) if existing_content: existing_content += [''] - else: - existing_content = [] self[section] = existing_content + content # string conversion routines