mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
commit
087d436309
@ -244,7 +244,7 @@ def load_mappings(app):
|
|||||||
# files; remote ones only if the cache time is expired
|
# files; remote ones only if the cache time is expired
|
||||||
if '://' not in inv or uri not in inventories.cache \
|
if '://' not in inv or uri not in inventories.cache \
|
||||||
or inventories.cache[uri][1] < cache_time:
|
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)
|
logger.info('loading intersphinx inventory from %s...', safe_inv_url)
|
||||||
try:
|
try:
|
||||||
invdata = fetch_inventory(app, uri, inv)
|
invdata = fetch_inventory(app, uri, inv)
|
||||||
|
@ -124,7 +124,7 @@ class SphinxWarningLogRecord(SphinxLogRecord):
|
|||||||
class SphinxLoggerAdapter(logging.LoggerAdapter):
|
class SphinxLoggerAdapter(logging.LoggerAdapter):
|
||||||
"""LoggerAdapter allowing ``type`` and ``subtype`` keywords."""
|
"""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
|
# type: (Union[int, str], unicode, Any, Any) -> None
|
||||||
if isinstance(level, int):
|
if isinstance(level, int):
|
||||||
super(SphinxLoggerAdapter, self).log(level, msg, *args, **kwargs)
|
super(SphinxLoggerAdapter, self).log(level, msg, *args, **kwargs)
|
||||||
|
@ -576,7 +576,7 @@ class HTMLTranslator(BaseTranslator):
|
|||||||
self.context.append('</a>')
|
self.context.append('</a>')
|
||||||
elif 'filename' in node:
|
elif 'filename' in node:
|
||||||
atts['class'] += ' internal'
|
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.body.append(self.starttag(node, 'a', '', **atts))
|
||||||
self.context.append('</a>')
|
self.context.append('</a>')
|
||||||
else:
|
else:
|
||||||
|
@ -522,7 +522,7 @@ class HTML5Translator(BaseTranslator):
|
|||||||
self.context.append('</a>')
|
self.context.append('</a>')
|
||||||
elif 'filename' in node:
|
elif 'filename' in node:
|
||||||
atts['class'] += ' internal'
|
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.body.append(self.starttag(node, 'a', '', **atts))
|
||||||
self.context.append('</a>')
|
self.context.append('</a>')
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user