diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-03-03 12:19:09 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-03-03 23:17:34 +0900 |
commit | 554199d30e418f72f215fae65924b47249d2544c (patch) | |
tree | fd952e21a8f4e9dabf91c5e3731dea3712ade006 /sphinx/domains/cpp.py | |
parent | 28b1aceefedbb9c3a12d6ba7c712df8ad5e98db8 (diff) | |
download | sphinx-git-554199d30e418f72f215fae65924b47249d2544c.tar.gz |
Upgrade to mypy-0.5
Diffstat (limited to 'sphinx/domains/cpp.py')
-rw-r--r-- | sphinx/domains/cpp.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index 824ea42fc..f1b8832f1 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -29,7 +29,7 @@ from sphinx.util.docfields import Field, GroupedField if False: # For type annotation - from typing import Any, Iterator, Match, Pattern, Tuple, Union # NOQA + from typing import Any, Callable, Dict, Iterator, List, Match, Pattern, Tuple, Union # NOQA from sphinx.application import Sphinx # NOQA from sphinx.builders import Builder # NOQA from sphinx.config import Config # NOQA @@ -539,7 +539,7 @@ class ASTBase(UnicodeMixin): # type: (Any) -> bool return not self.__eq__(other) - __hash__ = None # type: None + __hash__ = None # type: Callable[[], int] def clone(self): # type: () -> ASTBase @@ -3292,7 +3292,7 @@ class DefinitionParser(object): return DefinitionError(''.join(result)) def status(self, msg): - # type: (unicode) -> unicode + # type: (unicode) -> None # for debugging indicator = '-' * self.pos + '^' print("%s\n%s\n%s" % (msg, self.definition, indicator)) @@ -3373,6 +3373,8 @@ class DefinitionParser(object): # type: () -> unicode if self.last_match is not None: return self.last_match.group() + else: + return None def read_rest(self): # type: () -> unicode |