diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-02-09 00:57:53 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-02-09 00:57:53 +0900 |
commit | 2e87ee85a22279ee4ecc658f830520a88c90236d (patch) | |
tree | 124b080e0203aead764362ba1e5bd11da62822e5 /sphinx/pycode/ast.py | |
parent | d4aeae475943aef9b935f7487baf90ccc1c58b42 (diff) | |
parent | 1e5342faa9147c7a3c60e41dc7671e88f6795855 (diff) | |
download | sphinx-git-2e87ee85a22279ee4ecc658f830520a88c90236d.tar.gz |
Merge branch '2.0'
Diffstat (limited to 'sphinx/pycode/ast.py')
-rw-r--r-- | sphinx/pycode/ast.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sphinx/pycode/ast.py b/sphinx/pycode/ast.py index 155ae86d5..22207b715 100644 --- a/sphinx/pycode/ast.py +++ b/sphinx/pycode/ast.py @@ -38,6 +38,8 @@ def unparse(node: ast.AST) -> str: """Unparse an AST to string.""" if node is None: return None + elif isinstance(node, str): + return node elif isinstance(node, ast.Attribute): return "%s.%s" % (unparse(node.value), node.attr) elif isinstance(node, ast.Bytes): |