summaryrefslogtreecommitdiff
path: root/sphinx/pycode/parser.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-22 18:47:30 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-12-22 18:47:30 +0900
commit5640cf879f91c8ca5e71b68ab5a5fd24b536703a (patch)
tree6fc2107d8adc1ade4f9a8ca260db4e156fdde609 /sphinx/pycode/parser.py
parente83bb29789a093c651a255a509430a03346a5afb (diff)
parent43c089fd28dfdc33cc67b364724db51d3f5c1804 (diff)
downloadsphinx-git-5640cf879f91c8ca5e71b68ab5a5fd24b536703a.tar.gz
Merge branch '2.0'
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r--sphinx/pycode/parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py
index cbae86c9e..690f4297e 100644
--- a/sphinx/pycode/parser.py
+++ b/sphinx/pycode/parser.py
@@ -479,7 +479,7 @@ class Parser:
def parse_comments(self) -> None:
"""Parse the code and pick up comments."""
- tree = ast.parse(self.code.encode())
+ tree = ast.parse(self.code)
picker = VariableCommentPicker(self.code.splitlines(True), self.encoding)
picker.visit(tree)
self.comments = picker.comments