diff options
author | kpnr <hkm@mail.ru> | 2019-12-09 15:36:45 +0300 |
---|---|---|
committer | hkm <hkm@mail.ru> | 2019-12-12 23:38:01 +0300 |
commit | 4148207756df2792a80aead73b68c326391f7dfb (patch) | |
tree | 9f834123ab52ebc341071ad985b06dcaee6ace61 /sphinx/pycode/parser.py | |
parent | 1044ac4ac141ee063d76fafede3b78a8b386fe9f (diff) | |
download | sphinx-git-4148207756df2792a80aead73b68c326391f7dfb.tar.gz |
Update parser.py
encoding damages non-ASCII characters
Diffstat (limited to 'sphinx/pycode/parser.py')
-rw-r--r-- | sphinx/pycode/parser.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/pycode/parser.py b/sphinx/pycode/parser.py index 0dc07751e..85ae7be3d 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 |