Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
stsewd committed Jan 18, 2021
1 parent 30246a0 commit 61bd0cc
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions readthedocs_ext/readthedocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def update_body(app, pagename, templatename, context, doctree):
# This decouples the theme CSS (which is versioned independently) from readthedocs.org
if theme_css.endswith('sphinx_rtd_theme.css'):
try:
import sphinx_rtd_theme
import sphinx_rtd_theme # noqa
inject_css = LooseVersion(sphinx_rtd_theme.__version__) < LooseVersion('0.4.0')
except ImportError:
pass
Expand Down Expand Up @@ -162,9 +162,7 @@ def rtd_render(self, template, render_context):
'build_date': datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'),
'global_analytics_code': ctx.get('global_analytics_code'),
'user_analytics_code': ctx.get('user_analytics_code'),
'subprojects': {
slug: url for slug, url in ctx.get('subprojects', [])
},
'subprojects': dict(ctx.get('subprojects', [])),
'features': {
'docsearch_disabled': ctx.get('docsearch_disabled', False),
},
Expand Down

0 comments on commit 61bd0cc

Please sign in to comment.