diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py index e190cf0f1..33e218531 100644 --- a/sphinx/ext/intersphinx.py +++ b/sphinx/ext/intersphinx.py @@ -244,7 +244,7 @@ def load_mappings(app): # files; remote ones only if the cache time is expired if '://' not in inv or uri not in inventories.cache \ or inventories.cache[uri][1] < cache_time: - safe_inv_url = _get_safe_url(inv) # type: ignore + safe_inv_url = _get_safe_url(inv) logger.info('loading intersphinx inventory from %s...', safe_inv_url) try: invdata = fetch_inventory(app, uri, inv) diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py index d84535042..33b66f9c1 100644 --- a/sphinx/util/logging.py +++ b/sphinx/util/logging.py @@ -124,7 +124,7 @@ class SphinxWarningLogRecord(SphinxLogRecord): class SphinxLoggerAdapter(logging.LoggerAdapter): """LoggerAdapter allowing ``type`` and ``subtype`` keywords.""" - def log(self, level, msg, *args, **kwargs): # type: ignore + def log(self, level, msg, *args, **kwargs): # type: (Union[int, str], unicode, Any, Any) -> None if isinstance(level, int): super(SphinxLoggerAdapter, self).log(level, msg, *args, **kwargs) diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py index d4fe70234..eb2cb9049 100644 --- a/sphinx/writers/html.py +++ b/sphinx/writers/html.py @@ -576,7 +576,7 @@ class HTMLTranslator(BaseTranslator): self.context.append('') elif 'filename' in node: atts['class'] += ' internal' - atts['href'] = posixpath.join(self.builder.dlpath, node['filename']) + atts['href'] = posixpath.join(self.builder.dlpath, node['filename']) # type: ignore # NOQA self.body.append(self.starttag(node, 'a', '', **atts)) self.context.append('') else: diff --git a/sphinx/writers/html5.py b/sphinx/writers/html5.py index cec5faeac..115e44c86 100644 --- a/sphinx/writers/html5.py +++ b/sphinx/writers/html5.py @@ -522,7 +522,7 @@ class HTML5Translator(BaseTranslator): self.context.append('') elif 'filename' in node: atts['class'] += ' internal' - atts['href'] = posixpath.join(self.builder.dlpath, node['filename']) + atts['href'] = posixpath.join(self.builder.dlpath, node['filename']) # type: ignore # NOQA self.body.append(self.starttag(node, 'a', '', **atts)) self.context.append('') else: