Fix mypy violations

This commit is contained in:
Takeshi KOMIYA 2017-01-21 21:14:09 +09:00
parent cf966d4a97
commit 035ba39c2d
2 changed files with 2 additions and 3 deletions

View File

@ -224,7 +224,7 @@ class MessageCatalogBuilder(I18nBuilder):
extract_translations = self.templates.environment.extract_translations
for template in status_iterator(files, 'reading templates... ', "purple",
for template in status_iterator(files, 'reading templates... ', "purple", # type: ignore # NOQA
len(files), self.app.verbosity):
with open(template, 'r', encoding='utf-8') as f: # type: ignore
context = f.read()
@ -247,7 +247,7 @@ class MessageCatalogBuilder(I18nBuilder):
ctime = datetime.fromtimestamp( # type: ignore
timestamp, ltz).strftime('%Y-%m-%d %H:%M%z'),
)
for textdomain, catalog in status_iterator(iteritems(self.catalogs),
for textdomain, catalog in status_iterator(iteritems(self.catalogs), # type: ignore
"writing message catalogs... ",
"darkgreen", len(self.catalogs),
self.app.verbosity,

View File

@ -58,7 +58,6 @@ class AnchorCheckParser(html_parser.HTMLParser):
self.found = False
def handle_starttag(self, tag, attrs):
# type: (Any, Dict[unicode, unicode]) -> None
for key, value in attrs:
if key in ('id', 'name') and value == self.search_anchor:
self.found = True