Skip to content

Commit 54cccad

Browse files
committed
Handle Unicode docstrings on Python 2.x correctly
1 parent 447dd0b commit 54cccad

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)