mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
[Napoleon] Changes __unicode__ to use the six.u() function
This commit is contained in:
@@ -14,9 +14,8 @@
|
||||
import collections
|
||||
import inspect
|
||||
import re
|
||||
import sys
|
||||
|
||||
from six import string_types
|
||||
from six import string_types, u
|
||||
from six.moves import range
|
||||
|
||||
from sphinx.ext.napoleon.iterators import modify_iter
|
||||
@@ -163,10 +162,7 @@ class GoogleDocstring(UnicodeMixin):
|
||||
Unicode version of the docstring.
|
||||
|
||||
"""
|
||||
if sys.version_info[0] >= 3:
|
||||
return '\n'.join(self.lines())
|
||||
else:
|
||||
return u'\n'.join(self.lines())
|
||||
return u('\n').join(self.lines())
|
||||
|
||||
def lines(self):
|
||||
"""Return the parsed lines of the docstring in reStructuredText format.
|
||||
|
||||
Reference in New Issue
Block a user