diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-12 01:22:03 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-12-12 12:44:55 +0900 |
| commit | 8cba23b8c1b83cf02113d0dcc240ccdf363c97a0 (patch) | |
| tree | df4912bbf4d46df0677b3f2cc7f270a6560fa047 /sphinx | |
| parent | 7a0e205ebdf09460e88c4ecc14f39dcad31460e1 (diff) | |
| download | sphinx-git-8cba23b8c1b83cf02113d0dcc240ccdf363c97a0.tar.gz | |
Fix annotations
Diffstat (limited to 'sphinx')
| -rw-r--r-- | sphinx/locale/__init__.py | 2 | ||||
| -rw-r--r-- | sphinx/writers/manpage.py | 2 | ||||
| -rw-r--r-- | sphinx/writers/texinfo.py | 5 |
3 files changed, 5 insertions, 4 deletions
diff --git a/sphinx/locale/__init__.py b/sphinx/locale/__init__.py index b3857de2e..44c821937 100644 --- a/sphinx/locale/__init__.py +++ b/sphinx/locale/__init__.py @@ -48,7 +48,7 @@ class _TranslationProxy(UserString): return object.__new__(cls) def __getnewargs__(self): - # type: () -> Tuple + # type: () -> Tuple[str] return (self._func,) + self._args # type: ignore def __init__(self, func, *args): diff --git a/sphinx/writers/manpage.py b/sphinx/writers/manpage.py index ececac185..b6b434e2d 100644 --- a/sphinx/writers/manpage.py +++ b/sphinx/writers/manpage.py @@ -75,7 +75,7 @@ class NestedInlineTransform: if matcher(subnode): node.parent.insert(pos + 1, subnode) else: - newnode = node.__class__('', subnode, **node.attributes) + newnode = node.__class__('', '', subnode, **node.attributes) node.parent.insert(pos + 1, newnode) diff --git a/sphinx/writers/texinfo.py b/sphinx/writers/texinfo.py index b26c1055f..2b6cf7e2d 100644 --- a/sphinx/writers/texinfo.py +++ b/sphinx/writers/texinfo.py @@ -95,11 +95,12 @@ def find_subsections(section): # type: (nodes.Element) -> List[nodes.section] """Return a list of subsections for the given ``section``.""" result = [] - for child in section.children: + for child in section: if isinstance(child, nodes.section): result.append(child) continue - result.extend(find_subsections(child)) + elif isinstance(child, nodes.Element): + result.extend(find_subsections(child)) return result |
