Skip to content

Commit 9fc0e08

Browse files
committed
Merge pull request #1 from mdboom/unicode-docstrings
Unicode docstrings are not handled correctly on Python 2.x
2 parents 06407d1 + 54cccad commit 9fc0e08

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

numpydoc/numpydoc.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def mangle_docstrings(app, what, name, obj, options, lines,
5050
if sys.version_info[0] >= 3:
5151
doc = str(doc)
5252
else:
53-
doc = str(doc).decode('utf-8')
53+
doc = unicode(doc)
5454
lines[:] = doc.split(sixu("\n"))
5555

5656
if app.config.numpydoc_edit_link and hasattr(obj, '__name__') and \
@@ -182,4 +182,3 @@ def run(self):
182182
return base_directive.run(self)
183183

184184
return directive
185-

0 commit comments

Comments
 (0)