diff options
author | cocodrips <cocodrips@gmail.com> | 2018-12-26 11:31:44 +0900 |
---|---|---|
committer | cocodrips <cocodrips@gmail.com> | 2018-12-26 11:31:50 +0900 |
commit | 827059be93426b83afd2fc7d823c48681e5f913a (patch) | |
tree | ec1893e5cf77acbb79d736ea3f841dc864781740 /sphinx/ext/autodoc/__init__.py | |
parent | 448181d9f97611d352c0c8ec21e55e8242db9d60 (diff) | |
parent | 99a7dca2160996e3189dfcc2176bbbbac531d5f3 (diff) | |
download | sphinx-git-827059be93426b83afd2fc7d823c48681e5f913a.tar.gz |
Merge remote-tracking branch 'upstream/master' into 5842-apidoc-extensions
Diffstat (limited to 'sphinx/ext/autodoc/__init__.py')
-rw-r--r-- | sphinx/ext/autodoc/__init__.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sphinx/ext/autodoc/__init__.py b/sphinx/ext/autodoc/__init__.py index 900f4a378..ebd3a37b7 100644 --- a/sphinx/ext/autodoc/__init__.py +++ b/sphinx/ext/autodoc/__init__.py @@ -12,12 +12,10 @@ import inspect import re -import sys import warnings from typing import Any from docutils.statemachine import StringList -from six import text_type import sphinx from sphinx.deprecation import RemovedInSphinx30Warning, RemovedInSphinx40Warning @@ -461,13 +459,7 @@ class Documenter: def get_sourcename(self): # type: () -> str if self.analyzer: - # prevent encoding errors when the file name is non-ASCII - if not isinstance(self.analyzer.srcname, text_type): - filename = text_type(self.analyzer.srcname, - sys.getfilesystemencoding(), 'replace') - else: - filename = self.analyzer.srcname - return '%s:docstring of %s' % (filename, self.fullname) + return '%s:docstring of %s' % (self.analyzer.srcname, self.fullname) return 'docstring of %s' % self.fullname def add_content(self, more_content, no_docstring=False): |