mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-11-03 12:48:34 -06:00
Merge pull request #5805 from jdufresne/has-tag-str
Remove unnecessary bytes/str type check from doctree_read()
This commit is contained in:
1 file changed
+1
-6
@@ -12,7 +12,6 @@ import traceback
|
||||
import warnings
|
||||
|
||||
from docutils import nodes
|
||||
from six import text_type
|
||||
|
||||
import sphinx
|
||||
from sphinx import addnodes
|
||||
@@ -74,12 +73,8 @@ def doctree_read(app, doctree):
|
||||
env._viewcode_modules[modname] = False # type: ignore
|
||||
return
|
||||
|
||||
if not isinstance(analyzer.code, text_type):
|
||||
code = analyzer.code.decode(analyzer.encoding)
|
||||
else:
|
||||
code = analyzer.code
|
||||
|
||||
analyzer.find_tags()
|
||||
code = analyzer.code
|
||||
tags = analyzer.tags
|
||||
else:
|
||||
code, tags = code_tags
|
||||
|
||||
Reference in new issue
Block a user