mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix mypy violations
This commit is contained in:
parent
cf966d4a97
commit
035ba39c2d
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user