mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -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:
commit
94de89e0d0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user